views:

26

answers:

1

I've a local wamp setup and installed the deflate_module in apache.

I've also set up the following rule in .htaccess.

<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript text/javascript application/javascript application/json 

</IfModule>

But how can I test if it's working - how can I tell if the files are being gzipped?

Thanks!

A: 

use netcat and send an Accept-Encoding: gzip,deflate. If compressed mumbo-jumbo is returned, then your files are gzipped.

Example:

GET / HTTP/1.1
Host: www.yourdomain.org
Accept: text/xml,application/xml,application/xhtml+xml,text/html,text/plain,image/png,image/jpeg,image/gif
Accept-Language: en-us,en
Accept-Encoding: gzip,deflate
Connection: close

Don't forget to add two newlines at the end.

polemon