I have a webapp on a NGinx server. I set gzip on
in the conf file and now I'm trying to see if it works. YSlow says it's not, but 5 out of 6 websites that do the test say it is. How can I get a definite answer on this and why is there a difference in the results?
相关问题
- iOS (objective-c) compression_decode_buffer() retu
- How can I prevent my Shiny App from disconnecting
- Can't configure nginx as a proxy for tomcat wi
- How to set Nginx URI to fix empty URI in redirect
- Is there a public implemention of LZSS compression
Another useful tool: http://gzipwtf.com
It's the only tool I've seen that will parse your page and find all directly referenced resources (css, js files etc.), and tell you if each of them are gzipped, instead of just telling you if the index page is gzipped.
Also provides other useful statistics (time to download resource, speed, etc.)
None of the online tools above could test my URL which was an XML file, however this one does the job right:
http://www.feedthebot.com/tools/gzip/
You could quickly use a web service like: http://www.whatsmyip.org/http-compression-test/
Google Chrome's "Audits" tool in the developer tools comes in handy as well.
It looks like one possible answer is, unsurprisingly,
curl
:In the second case the client tells the server that it supports content encoding and you can see that the response was indeed shorter, compressed.
In new version of chrome, Developer tools > network, you can right click on Column name, and select content-encoding option and add that column (black box in image).
and if you want to see the size of that gzip content, as @Outfast Source - than you can click on icon which is next to View (displayed as Green box in image).
so you can see which content is gzip enabled.
I wrote this script based on the zoul's answer:
example: