Problem With Solutions

Something Different In Linux

Home » How to » check gzip compression is enable or not

check gzip compression is enable or not

Posted by Rishikesh Vispute Categories: How to, Uncategorized

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::
# httpd -l

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

One Response so far.

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


Page optimized by WP Minify WordPress Plugin

Optimized by SEO Ultimate