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?
You can tell using Developer Tools (F12). Go to the Network tab, select the file you want to examine and then look at the Headers tab on the right. If you are gzipped, then you will see that in the Content-Encoding.
Gzip (GNU zip) is a free and open source algorithm for file compression. The software is overseen by the GNU project. In this context, compression is the deliberate reduction in size of data to save storage space or increase the data transfer rate.
gzip is commonly supported by web servers and modern browsers, meaning that servers can automatically compress files with gzip before sending them, and browsers can uncompress files upon receiving them.
All modern browsers can handle a gzip encoded response. In fact, if you look at their requests, they'll have a header that says something along the lines of Accept-Encoding: gzip which is their way of saying to the server that they can handle gzipped responses.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With