I am busy checking how my web server is doing gzip. I'm confident now that gzip is on as Chrome shows the content-encoding: gzip
HTTP header.
Is there a easy way to see how much a file was compressed in the Chrome developer tools?
Webmasters Stack Exchange is a question and answer site for webmasters. It only takes a minute to sign up.
Sign up to join this communityUpdated answer for 2017: Yes.
The size column in the Network tab in Chrome Developer Tools has both the compressed and uncompressed size, for gzip, brotli and whatever comes in future. Eg:
Here the compressed size is 242 KB, the uncompressed size is 1.1 MB
To see both, ensure you have Devtools showing large request rows. You can find the checkbox by the gear icon "Network settings" in the Networks-specific toolbar.
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.
Update for 2017
When using large icons, the chrome dev tools show a before and after compression size in the network tabs.
I confirmed by switching gzip off and on on my webserver.
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.
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.
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!
For anyone still arriving here from a general google search (like I did), in modern versions of Firefox it's possible to see the "raw" and gzipped size directly from its devtools by comparing the "Transferred Size" column and "Size" column. "Size" is the raw size of the response, the "Transferred size" is the actual size of the data transferred for the response, which may be lower than actual size in case of gzip, like in the image below, or even 0 in case the response has been cached in the client.
Content-Length
header.