Reputation: 85765
I am using a compression library for my js and css files. However according to yslow the file that it generates is not gzipped but it should be. So I want to verify this myself but I don't know how.
How do I do this in firefox or firebug?
Upvotes: 29
Views: 21278
Reputation: 933
For those who look for the same in Chrome, just check the Content-Encoding from the Response headers in network tab
Upvotes: 4
Reputation: 3951
Did you get here from Google and you're NOT using Firebug? Here’s how you find if a file is gzipped via Firefox’s Dev Tools…
Happy coding!
Upvotes: 5
Reputation: 3646
I you are using mozilla use firebug network profiler to see actually the size of your file getting reduced and to cross check click on the link to see the request and response header having:
Content-Encoding: gzip
By the way if you are using tomcat then you can use tomcat inbuilt feature to do gzip compression. add comression = "on" in server.xml [most of the server have compression support.]
<Connector port="8443"
compression="on"
compressionMinSize="2048"
noCompressionUserAgents=""
compressableMimeType="text/html,text/plain,text/css,text/javascript,text/json,application/x-javascript,application/javascript,application/json"
/>
Upvotes: 1
Reputation: 9110
You can tell by looking at HTTP Response Headers - look for 'Content-Encoding: gzip'
You can probably tell by drilling into the Net tab in Firebug, but I always used to use the Web Developer Toolbar (a Firefox extension) for checking response headers. There is also a lesser-featured extension called Live HTTP Headers. https://addons.mozilla.org/en-US/firefox/addon/3829/
Alternatively, you can google for a website such as this, to check for you:
http://www.gidnetwork.com/tools/gzip-test.php
hth
Upvotes: 39