How to check gzip compression is enable on the server or domain.
The gzip compression required mod_gzip.c or mod_deflate.c module installed on the server.
How you can check this module installed on the server
root@server [~]# /usr/local/apache/bin/httpd -l
or
root@server [~]# httpd -l
If one of the module is installed on the server then, you can enable the gzip compression for the account as follows.
You can check it by using the following commands
| For Apache 1:: # /usr/local/apache/bin/httpd -l
For Apache 2:: |
You need to add the following code into the .htaccess file to enable the gzip compression for the domain.
| #compress all text & html: AddOutputFilterByType DEFLATE text/html text/plain text/xml # Or, compress certain file types by extension: <Files *.html> SetOutputFilter DEFLATE </Files> |
After adding above code in .htaccess file, you can check the gzip compression is enable or not by using the following URL.
http://www.gidnetwork.com/tools/gzip-test.php
When you enter the domain name in the above URL then it shows the
Web page compressed? Yes
Compression type? gzip









For commandline testing you can use wget:
wget –save-headers –header\=”Accept-Encoding: gzip,deflate” http://website.com
Or use this good online tool:
http://www.sysadmin.md:3000/