Enable Gzip Compression via .htaccess



Share this article :

Gzip compression is one of the tools to make your website load faster. The Gzip will compress your website and reduces the size of static file, page thus reducing the bandwidth usage. You can get the clear picture on how the Gzip compression works from Google Developers site. They even produce a video for this!

1. Login to your web host server. Locate and add the following lines into the .htaccess file. Save and your are done!

##### Gzip Compression #################################
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddType x-font/otf .otf
AddType x-font/ttf .ttf
AddType x-font/eot .eot
AddType x-font/woff .woff
AddType image/x-icon .ico
AddType image/png .png
##### Gzip Compression #################################

2. To verify the Gzip compression is successfully activated on your website, you can test using below website,

http://www.gidnetwork.com/tools/gzip-test.php
http://checkgzipcompression.com/

Related posts

HTML Link Attributes
Find & Edit .htaccess in cPanel
Online Check Computer Hardware / Software Requirements for PC Games
Block Search Engines from Indexing Your Website
© 2017 ITsiti. All Rights Reserved
Powered by KEEM