Try : Insurtech, Application Development










Dev Ops(2)

Enterprise Solution(20)




AI in Insurance(25)


Product Innovation(34)


Augmented Reality(7)

Customer Journey(7)


User Experience(21)

Artificial Intelligence(94)



Cognitive Computing(7)

Computer Vision(6)

Data Science(13)


Intelligent Automation(25)

Machine Learning(43)

Natural Language Processing(10)

11 Proven Ways to Optimize Website Performance

4 minutes, 23 seconds read

Website performance optimization or simply, website optimization is a process of improving a website’s loading speed in the browser. It generally involves editing the website to optimize scripts, HTML, or CSS code and reducing the number of web page components like images, scripts, or video for faster loading. 

What is web performance?

Web performance is the speed in which web pages are loaded and displayed on the user’s web browser.

Website performance metrics

The following are the website performance metrics-

#1 DNS lookup time

The Domain Name System (DNS) is the phonebook of the Internet. Users access online information through domain names, like www.mantralabsglobal.com. Web browsers interact through Internet Protocol (IP) addresses. DNS translates domain names to IP addresses so that browsers can load Internet resources.

#2 Initial connection

It is the time for a handshake between the browser and the server to retrieve the contents of the page. Handshaking is a process by which two devices initiate communications (here- browser and server). It initiates with the browser sending a message to the server indicating that it wants to establish a connection. 

#3 Waiting time (TTFB)

It is the time spent waiting for the initial response, also known as the Time To First Byte. This time captures the latency (the delay between the instruction and data transfer) of a round trip to the server. It also accounts the time spent waiting for the server’s response.

#4 Download Time

It is the time spent receiving the response data.

11 Proven website performance optimization techniques

You’ll need to consider the following to enhance a website’s performance.

#1 Reduce DNS lookup time

Implement the following to reduce DNS lookup time-

  1. Reduce the number of hostnames, that are used to generate a web page.
  2. Host third party resources locally, which automatically reduces the DNS lookup.
  3. Use DNS Cache, where cache time can be defined to different types of hosts, so it reduces the lookup time.
  4. DNS prefetching: allows browsers to perform DNS lookup in the background while the user browses the current page.
  5. Defer parsing Javascripts, which are not needed while loading a web page but render blockers.
  6. Use a fast DNS provider: choose the DNS providers whose lookup time is minimal.

#2 Browser/Web cache

It is a temporary storage location on a computer for files that a browser downloads to display websites. Locally cached files may include any documents from a website, such as HTML files, CSS style sheets, JavaScript scripts, graphic images, and other multimedia content. When a user revisits the website, the browser checks for the updated content and downloads only those files or what is not already present in the cache. This reduces bandwidth usage on both the user and server-side and loads the page faster.

#3 Image Optimization 

It is a process of delivering high-quality images in the right format, dimension, size, and resolution while keeping the smallest possible size. There are different ways to optimize images. You can resize, cache, or compress the image size.

#4 HTML, CSS, and JS Minification

While moving the source of website production, minify the contents of source code (Uglify), to reduce the overall size of the page. It will enhance the download speed for the page content on the web browser.

#5 HTML hierarchy

Maintain the standard HTML hierarchy, which means- push all the render-blocking scripts to the bottom of the page and keep only required assets on the header part of the load content. This way, the user doesn’t have to wait to see the actual page because of render-blocking scripts.

#6 Use Sprites

Sprite images are the group of images, which are combined to create a single image for a web page. As the number of server requests affects the bandwidth and loses the page speed score, it is better to combine all the possible images into sprite images.

#7 Enable compression

The web standards suggest GZIP compression. It is effective for optimum bandwidth utilization while rendering the contents. Let’s say- the overall size of the assets is 900KB. Enabling GZIP compression can compress the content size to at least 600KB. This enhances the bandwidth and pages render at a faster rate.

#8 Use secure channels/protocols

Prefer using secured channels to load the web page contents. It prevents the malware intro into the page.

#9 Reduce the number of redirections

Use a very less number of redirections in the websites. The introduction of too many redirections will consume the DNS lookup time and affect the page load time.

#10 Use CDN

Use CDN paths for the static resources, which enhances the load time performance of the website. CDN is useful for pre-caching static resources, which helps in reducing the time-to-index and hence reduces the load time. Also, distributed data centers host CDNs. Therefore, the nearest CDN host will fetch the assets- boosting the performance of the website.

#11 Avoid hotlinking

Hotlinking is the process of directly using the content from another site into the source website. Avoiding this will affect the bandwidth of both sites.

Also read – Everything you need to know about Test Automation as a Service.

why do we need webpage performance optimization

Do you have any questions regarding your website performance? Feel free to comment or write to us at hello@mantralabsglobal.com & stay tuned for our next article on 8 Factors that Affect Page Load Time & Website Optimization Strategies.


Knowledge thats worth delivered in your inbox

8 Best Ways to Reduce Android App Size

5 minutes, 29 seconds read

With the increase in mobile storage spaces that have gone up to 256 GB, app size is also growing. App size is sure to grow as developers are adding new features, trying to meet customer needs, and also trying to support their apps on various screen sizes. Around 74% of the world uses Android, and 70% of users consider app size before installing them. Moreover, as humans are getting accustomed to instant gratification, they ponder on ways to download apps as they take up storage spaces. Despite the cloud support for photos, videos, and files, android users face issues, such as mobile hanging due to app size. As customer expectations are increasing, android app developers are considering other ways to reduce app size while still incorporating significant additional features and keeping in mind the customer experience.

Below are the 8 best ways to reduce android app size:

1. Use Android App Bundle to Reduce App Size

When generating the release version of your app, you can choose between APK and Android App Bundle.  The second option will make Google play to generate the APK with only those features a specific user need. 

Use Android App Bundle

App Bundle Vs APK

Android App Bundle

  • It is a publishing format that includes compiled code and resources of your app, and delays APK generation and signing to Google Play.
  • With Android App Bundles, the compressed download size restriction is 150 MB. The app bundle cannot be used with APK expansion files.
Android App Bundle
Important: In the second half of 2021, new apps will be required to publish with the Android App Bundle on Google Play. New apps larger than 150 MB must use either Play Feature Delivery or Play Asset Delivery.

How to build android app bundles?

To build app bundles, follow these steps:

  1. Download Android Studio 3.2 or higher—it’s the easiest way to add feature modules and build app bundles.
  2. Add support for Play Feature Delivery by including a base module, organizing code and resources for configuration APKs, and, optionally, adding feature modules.
  3. Build an Android App Bundle using Android Studio. You can also deploy your app to a connected device from an app bundle by modifying your run/debug configuration and selecting the option to deploy APK from app bundle. Keep in mind, using this option results in longer build times when compared to building and deploying only an APK.
  4. If you’re not using the IDE, you can instead build an app bundle from the command line.
  5. Test your Android App Bundle by using it to generate APKs that you deploy to a device.
  6. Enroll into app Play App Signing. Otherwise, you can’t upload your app bundle to the Play Console.
  7. Publish your app bundle to Google Play.

Please note: Android Package Kit – As per developer console, by the mid of 2021, developers won’t be able to upload apk on play store)

  • Android operating system uses APK which is the package file format for distribution and installation of mobile apps, games and middleware. APK is similar to other software packages such as APPX in Microsoft Windows or a Debian package in Debian -based operating systems.
  • Google Play requires that the compressed APK downloaded by the users should not exceed 100 MB.
  • The expansion files for your app are hosted by Google Play which serves them to the device at no cost to you. The expansion files are saved to the device’s shared storage location (the SD card or USB-mountable partition).

2. Use Proguard

Proguard is probably one of the most useful tools to reduce your APK size. It reduces the source code files to a minimum and can reduce the APK file size upto 90%.

  • Use it in all variants whenever using “Proguard”
  • Helps to avoid conflict at the of generate apk or bundle if will use in all the variants.
  • We cannot let ProGuard rename or remove any fields on these data classes, as they have to match the serialized format. It’s a safe bet to add a @Keep annotation on the whole class or a wildcard rule on all your models.

3. Use Android Size Analyzer Plugin

This Android Studio plugin will provide you recommendations to reduce the size of your application.

With the APK Analyzer, you can accomplish the following:

  • View the absolute and relative size of files in the APK, such as the DEX and Android resource files.
  • Understand the composition of DEX files.
  • Quickly view the final versions of files in the APK, such as the AndroidManifest.xml file.
  • Perform a side-by-side comparison of two APKs.

There are three ways to access the APK Analyzer when a project is open:

  • Drag an APK into the Editor window of Android Studio.
  • Switch to the Project perspective in the Project window and then double-click the APK in the default build/output/apks/ directory.
  • Select Build > Analyze APK in the menu bar and then select your APK.

More details at: Jetbrains

4. Optimize Your App’s Resources

Whether used or not, every resource takes up memory. It is therefore necessary to have only those resources that you need, and to use those in a memory efficient way. In other words, you should consider the resolution of the image before finalizing on it.

5. Optimize Libraries

As large libraries consume huge amounts of space, it is advisable to remove parts of it in case you do not need them and if it is permitted by the license of the library. Proguard can aid you in this process but it is not always able to remove large internal dependencies.

6. Use Vector Graphics Wherever Possible

They are sharp and do not consume much space as they rely on mathematical calculations and not on pixels that need to be saved. However, they cannot be used for photography.

7. Compress Your Images

By using tools such as pngcrush, you can reduce the file size of PNG images. It is advisable to do this images as they still look the same. 

8. Only Support Specific Densities

If only a small portion of users use a specific density, it might be better to let Android scale your other densities for them as it would reduce your APK size.

As mobile storage space is growing, people are installing a large number of apps to meet a wide range of needs. But as app size is increasing, people are continuing to struggle with storage issues. With provisions such as Proguard, one can compress the APK file size and optimize libraries easily. Compressing images and using vector graphs are also useful in reducing app size.

About the author: Anand Singh is Tech Lead at Mantra Labs. He is integral to the company’s Android-based projects and enterprise application development.

Further Reading:


Knowledge thats worth delivered in your inbox

Loading More Posts ...
Go Top

May i help you?

bot shadow

Our Website is
Best Experienced on
Chrome & Safari

safari icon