Enable gzip compression

Compression allows your web server to provide smaller file sizes which load faster for your website users.

Gzip is a method of compressing files (making them smaller) for faster network transfers.

If you are not using it for some reason, your webpages are likely slower than your others.

Enable Gzip compression through htaccess in apache server

<ifModule mod_gzip.c>
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.*

Save the .htaccess file and then refresh your webpage.

How effective is gzip compression?

Compression of your HTML, CSS, Javascript files with gzip saves around 50 to 70% of the file size.that it takes less time to load your pages.

When a request is made by a browser for a page from your site your webserver returns the smaller compressed file. All modern browsers understand and accept compressed files.

Hope it help you...

Please go ahead and write us if you want to improve this article

Leave a comment

your email address will not be published. required fields are marked *

Name *
Email *