Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I am busy checking how my webserver is doing gzip. I'm confident now that gzip is on as chrome shows the content-encoding: gzip header.

Is there a easy way to see how much a file was compressed in the Chrome developer tools?

share|improve this question
1  
If there's a plugin for viewing HTTP headers, then you could just compare the document size to the Content-Length header. –  Lèse majesté Oct 29 '10 at 13:19

5 Answers 5

up vote 9 down vote accepted

By far the easiest method is to use an online tool. GIDZipTest shows you plenty of detail: the original size, compressed size and compression percentage.


However, it is possible in Chrome with a bit of effort. (Updated for latest Chrome, Sept 2011.)

In the Developer Tools, go to the "Network" tab and reload the page. You will see a list of all the files fetched on the left column. Click the appropriate page/file on the left then the "Headers" tab on the right pane.

Under "Response Headers" you should see "Content-Encoding: gzip" followed by a "Content-Length" header. This is the size of the compressed content.

Finding the uncompressed size is more difficult. If you're serving up static files you can simply check its size. For dynamic content you'll have to copy-paste the HTML into a text editor and save it to check the exact size.

share|improve this answer
    
where is the "enable resource tracking" ? –  Pacerier Sep 24 '11 at 2:10
    
@Pacerier: it's slightly different in the latest version of Chrome; I've updated my answer with new instructions. –  DisgruntledGoat Sep 25 '11 at 23:47
    
Neat tool. I couldn't figure out why responses being sent by my Google App Engine app weren't showing the compressed size. Responses sent by the SDK (ie localhost) aren't compressed while responses coming from the cloud are. Turns out, Chrome is working perfectly. –  Evan Plaice Jun 4 '12 at 23:56

I've heard the one in chrome is flawed due to a bug in webkit.

The Y Slow Plugin for firefox does a great job. When running it go to the Components tab and expand the type of component you want the values for. It will show the original size and the gzip size.

share|improve this answer

This isn't a tool for Chrome specifically, but I use Fiddler when checking HTTP traffic/header information. It's a great tool, works on any browser and it's free!

share|improve this answer

Another way to accomplish this is with cURL:

curl -i -H "Accept-Encoding: gzip" http://someurl.com | wc -c

versus

curl -i http://someurl.com | wc -c

The number shown after each command is the number of bytes that crossed the wire.

share|improve this answer

I second the answer about Yslow, if you want to see specifically how much an individual resource was reduced by gzip.

Also a great way to easily and quickly check for gzip on resource files is a new service gzipWTF . It's a lot easier than fiddling through browser plugins if you just want a good summary.

share|improve this answer

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.