In this tutorial, you will learn how to enable GZIP compression for your website. GZIP compresses your web pages and style sheets before sending them over to the browser. This drastically reduces transfer time since the files are much smaller.
Enabling Gzip compression isn’t difficult at all! All you need to do is add the following piece of code to your site’s .htaccess file:
<IfModule mod_deflate.c> # Compress HTML, CSS, JavaScript, Text, XML and fonts AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/vnd.ms-fontobject AddOutputFilterByType DEFLATE application/x-font AddOutputFilterByType DEFLATE application/x-font-opentype AddOutputFilterByType DEFLATE application/x-font-otf AddOutputFilterByType DEFLATE application/x-font-truetype AddOutputFilterByType DEFLATE application/x-font-ttf AddOutputFilterByType DEFLATE application/x-javascript AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE font/opentype AddOutputFilterByType DEFLATE font/otf AddOutputFilterByType DEFLATE font/ttf AddOutputFilterByType DEFLATE image/svg+xml AddOutputFilterByType DEFLATE image/x-icon AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/xml # Remove browser bugs (only needed for really old browsers) BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html Header append Vary User-Agent </IfModule>
With this online tool, you can check if your web server is sending the correct GZIP enabled header.
If GZIP is properly enabled, the result will look like this:
That’s it! Now you know how to enable GZIP compression for your website.
If you are a ChemiCloud customer, we have you covered. GZIP compression is enabled by default on all our web hosting plans.
hi! the link pointing to https://varvy.com/tools/gzip/ is dead (redirecting to another page)
I am SARID RAENGKRUD for the next steps?
Hey Vikas. Thanks for reaching out! The speed of your site depends on multiple factors. And the process of optimizing your site for better performance is different from one website to another. Your site seems to be running from a server using Apache as the webserver at a quick look. Why not consider a switch to a web host that’s using LiteSpeed? You should see a massive improvement in your site’s speed. You can read more on this topic at https://chemicloud.com/blog/litespeed-vs-nginx-vs-apache/
I have Everything to decrease loading speed of my website, please provide me some more tips
https://visaavail.com/
Thanks for your feedback. There’s an online tool mentioned in the article – https://varvy.com/tools/gzip/ which can be used to check if GZIP compression is enabled already.
before doing this, how do you check if its already enabled?
See This