Wednesday, March 14, 2012

Google Page Speed: Gzip and Caching, order matters

Ok so this may seem pretty simple and obvious, but it is late in the day and my brain is fried so I just wasted time on it. If you're ever using Google Page Speed and it suggests enabling caching and enabling Gzip compression, make sure you enable caching last. I just accidentally enabled caching, then went about enabling Gzip for all of my mime types. The problem is that Page Speed was (correctly) listening to my caching rules and as such, I was fooled into thinking my Gzip rules were not taking. In reality, Gzip was working fine, but the JS and CSS files were cached and thus my browser still viewed them as "uncompressed". Order matters.

No comments:

Post a Comment