Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Here's the gzip section from my current nginx.conf:

gzip  on;
gzip_http_version 1.1;
gzip_vary on;
gzip_comp_level 6;
gzip_proxied any;
gzip_types text/plain text/html text/css application/json application/x-javascript text/xml;
gzip_buffers 16 8k;
#gzip_disable "MSIE [1-6]\.(?!.*SV1)";
gzip_min_length  1100;

I'm testing by downloading a 14KB html file and checking the headers with the httpfox plugin for FireFox / analyzing the page with the PageSpeed plugin, and I've also tried http://www.gidnetwork.com/tools/gzip-test.php.

I believe the gzip module is installed correctly, because I was able to get a single "Yes" from the gid tester when I changed the gzip_http_version to 1.0, but httpfox and PageSpeed always tell me that the file is not compressed.

I've tried lots of different combinations here and can't seem to get it to work.

Installation and server details: I'm on a server at WebFaction, and nginx was installed as part of a custom script application (Ruby) that I installed some months ago.

Update:
On the other hand, the test at this URL tells me that compression is working correctly:
http://nontroppo.org/tools/gziptest/

Could it be that the other tools are simply reporting this incorrectly?

share|improve this question
    
"gzip_comp_level 6" is a pointless waste of CPU cycles, and will add dozens or event hundreds of miliseconds of latency to compressed requests versus the default compression level of 1. ALl for perhaps 5% savings in size. Test for yourself with something like apachebench... throughput with higher gzip levels is drastically reduced, and latency is far higher, but bandwidth is almost exactly the same. –  rmalayter Sep 9 '10 at 3:40
add comment

3 Answers

up vote 1 down vote accepted

I've got more confidence in redbot for resource checking.

Since the usage of gzip depends on a lot of factors, it's probably best to check with a real environment (real browser/proxy/etc) and monitor the result using a network-analyzer (wireshark)

share|improve this answer
    
Thanks for the tips. I'm now satisified that gzip encoding is working correctly and the other tools I'd used to test were simply not reporting correctly (either due to faulty testing on my part [PageSpeed, HttpFox] or faulty tools [gidnetwork.com/tools/gzip-test.php]). –  Tex Aug 26 '10 at 10:26
add comment

Only difference between yours and mine is that I have

gzip_disable     "MSIE [1-6]\.";
share|improve this answer
    
I've got that line commented out at the moment, actually. It's commented out in the code example above, as well. –  Tex Aug 25 '10 at 17:30
    
Could you tell where this live? Most likely you just have a cached version or something. –  Martin Fjordvald Aug 25 '10 at 23:03
add comment

Try using the firebug plugin under Firefox,a lot of developers including myself rely on this tool and it has an accurate reporting mechanism for gzip

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.