Enable Gzip Compression for gtmetrix page speed

Enable gzip compression
Reduce the size of files sent from your server to increase the speed to which they are transferred to the browser.

Reduce sizes of pages by up to 70%
Increase page speed
Cost-benefit ratio: high
Access needed to the .htaccess files or server administration files

Enable Gzip Compression gTmetrix Page Speed

Enable Gzip Compression gTmetrix Page Speed

The code below should be added to your .htaccess file…

<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.


Leave a comment