Reputation: 117
I'm trying to improve page speed on a site and using "Yslow" and "Page Speed" to monitor the speeds. I am being told by both to "compress components with gzip" and given a listing of a number of CSS and JavaScript files, for example
Our hosting have informed us that nginx is doing the gzip compression on ALL assets, even if it reverse proxies back to Apache and the folllowing values from the nginx site-enable files, which is enabled at a virtual host level, confirms this:
gzip on;
gzip_disable msie6;
gzip_static on;
gzip_comp_level 9;
gzip_proxied any;
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
Is there a reason these tools are not picking up by the compression or is it in fact they are not being compressed at all and we need to get our hosting to add something extra?
Upvotes: 1
Views: 3610
Reputation: 10546
your hosting provider claims that the requests leave nginx compressed that leaves as potential problem causes:
the problem could be a proxy or cache inbetween the nginx server and your browser that strips out the compression.
Some things to try:
curl --compressed --head <your-asset-url>
is (you should see a Content-Type: gzip
if the response coming in is compressed)Upvotes: 3