Get the high performance and scalability to your online store by choosing Magento 2 migration. Go live in 3 weeks. Get in Touch.

Magento performance has been considered an important parameter in improving the customer experience. With huge product lines and numerous extensions, performance of certain Magento stores has taken a hit. There are a few tricks that we have up our sleeve to improve the Magento performance.

This blog post focuses purely on the tweaks that we need to do in the .htaccess file to improve performance.

Step 1: Gzip Compression & Enable Output Compression:

Gzip compression is used to increase the site performance by compressing the server responses sent to the client. Enabling gzip compression in Magento is a simple process, we need to make a slight modification to the .htaccess file in the root directory. By default, Magento includes the required lines to enable gzip compression, but they are disabled. To enable, simply uncomment the appropriate lines

Enable output compression by uncommenting the following line of code.

 Step 2: Leverage Browser Caching and Expires Headers

Browsers use “Expires Headers” to determine how long a page component can be cached. Expires headers checks whether a resource on a website needs to be requested from the source or if it can be fetched from the browser’s cache. For example, when we set an Expires header for all jpeg images, the browser will store those resources in its cache. The next time the visitor comes back to the page, it will load faster since the browser will already have all those images in its cache. To enable, change the below code

The existing code,


Step 3: Disable ETags

ETags are a way for browsers to validate cached components across subsequent visits. They can slow down a site served from a cluster, if the cluster hasn’t implemented them properly. It is best to just turn them off as follows:

Converting a normal visitor into a potential customer is purely based on the experience that a customer receives in an eCommerce portal. These simple tweaks in Magento will help a lot in enriching that experience.


  • Balasubramaniam

    Balasubramaniam, aka Bala, is a Certified Magento Developer Plus Senior Software Engineer and one of our gems in the Magento team. A quick learner, he owns the projects that he works in and ensures they are delivered on time. He is very good at analyzing/fixing bugs and Magento customizations.


Ready to drive online revenue

Get In Touch

2 thoughts on “TIPS & TRICKS To Improve Magento Performance

  1. Thank you Balasubramaniam, I am your regular reader and like your posts, It helps me a lot to figure out things independently, Its very useful and helped me to decrease my store load timing.

Leave a Reply

Your email address will not be published. Required fields are marked *