How to Enable Gzip Compression For Website

Gzip Compression For Page Speed:

The biggest and common problem with developers & bloggers is that, Webpage speed.Because page loading speed put enough impact on users. Almost bloggers facing this tragic situation. Including me in 2012, when I started my blog journey. This was incredible experience. Page speed is also matter on your website performance and site quality. Search engines also preference quick/instant load pages.

How to Enable Gzip Compression

Gzip compression compress HTML, CSS and java files even your site images. Gzip compression reduce the file size and increase the page loading speed. Gzip compression save 40 to 60% loading time and also file size. If you are a WordPress user then recommend you to give preference w3 total cache plugin and also Gzip. Both are reliable and recommended. Now I will show that, How you can enable Gzip compression and reduce your page loading speed and get positive feedback from your users/readers/visitors side. Note the website speed before & after enable gzip, Then you can estimate the differ both of them.

Enable Gzip Compression using .htaccess file:

We will enable gzip through .htaccess file from server-side. For this task Goto or Login inside your Cpanel then Goto ->File manager and open .htaccess name file. then simply grab or copy the below code and past inside .htaccess file.

# Start Gzip Compression Code


mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*


# END Gzip Compression Code

After paste the above code, Again save the .htaccess file. Open new window in your browser and check your site speed. Hopefully, Now this will work fantastic !!

You need to check your site on Gzip compression checker for conformation that, it is enabled or not. Also check and analyze your site speed & page loading time through Pingdom tool. Both are user-friendly and free to use it.

To being professional, you need to adopt professional skills and techniques. If you are interested to decrease your site loading speed then image optimization is the one and crucial factor. Gzip compression doesn’t put effect on server files. Gzip compression also save your site bandwidth that’s means it is saving you money. Now for dispute on that topic, you can comment below. 🙂

Leave a Reply

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