Optimizing magento for speed
2Hats . 1 minute

What is Gzip compression?

This is a small post about what Gzip compression is.

Basically, Gzip is a compression method that makes files/data smaller in size and there by let it travel faster over networks. This compression allows web servers to send smaller files to the requested users increasing the page load speed. The HTTP protocol has the ebility to gzip data. But zipping the data makes the server do additional work. The browser will be unzipping the files. Text files, like JS, CSS and HTML are best compressed by Gzip.

How does Gzip compression work?

Gzip locates similar strings in a text file (say Javascript, CSS or HTML) and replaces those strings temporarily to make the file size smaller. This information is passed as meta data to the browser to understand for decompressing files. CSS and HTML has many strings that come repeating, that is why Gzip is very effective in the text content compression and not very effective in image compression.

How to enable Gzip compression in my server?

For apache servers you need to enable mod_deflate module and use the following code in .htaccess file.

Need help enabling Gzip compression? Contact us here!

blog
Greetings! I'm Aneesh Sreedharan, CEO of 2Hats Logic Solutions. At 2Hats Logic Solutions, we are dedicated to providing technical expertise and resolving your concerns in the world of technology. Our blog page serves as a resource where we share insights and experiences, offering valuable perspectives on your queries.
Aneesh ceo
Aneesh Sreedharan
Founder & CEO, 2Hats Logic Solutions
Subscribe to our Newsletter
Arsha Contact

    Stay In The Loop!

    Subscribe to our newsletter and learn about the latest digital trends.