GZIP js & css

In the results of webpagetest the results of gzip seem to be okay.
But Google Webmaster tools say, that I should gzip js and css also.
Should I?

Check the headers and make sure WebPagetest is reporting correctly but I would expect it is (haven’t seen a case where it isn’t). If your compression is done by a BrowserMatch rule it’s possible that the Webmaster tools bot is being excluded.

I don’t have such rules (should I?).

This is what I have:
AddOutputFilterByType DEFLATE text/plain text/html text/xml
AddOutputFilterByType DEFLATE text/css text/javascript text/x-js
AddOutputFilterByType DEFLATE application/xml application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript application/x-javascript

Is that alright?
Is it correct for js and css?


Those look fine (BrowserMatch was the only thing that jumped out at me as to why Google may see it differently). I wouldn’t necessarily worry about the list of recommendations on the webmaster tools portal - focus more on the time chart which is what they are looking at (as best as I can tell) and is what your users are actually seeing across your whole site.

Wouldn’t hurt to run you page through YSlow and Pagespeed just to be sure (in Firefox) but if there really is a problem it’s probably on a different page.

I think its an old bug with Webmaster Tools, when it sees js and css embedded from other google services (adsense, analytics, etc) …

If other tools say your gzip is fine then its ok…


I’ve also found this link to be extremely helpful when you are trying to determine if a file is gzipped from outside your own network (if it is going through a load balancer or something like that) and you want an instant result.