Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to check if a file is gzipped or not in firefox/firebug

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?

like image 446
chobo2 Avatar asked Jul 05 '10 22:07

chobo2


People also ask

How do I know if a response is gzipped?

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.

What is gzipped data?

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.

Can browser read gzip?

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.

Do any browsers not support gzip?

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.


1 Answers

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

like image 139
laher Avatar answered Oct 06 '22 12:10

laher