How can I tell if my server is serving GZipped con

2019-01-12 17:27发布

I have a webapp on a NGinx server. I set gzip on in the conf file and now I'm trying to see if it works. YSlow says it's not, but 5 out of 6 websites that do the test say it is. How can I get a definite answer on this and why is there a difference in the results?

8条回答
相关推荐>>
2楼-- · 2019-01-12 18:01

Update

Chrome changed the way it reports (see original answer if interested). You can tell using Developer Tools (F12). Go to the Network tab, select the file you want to examine and then look at the Headers tab on the right. If you are gzipped, then you will see that in the Content-Encoding.

In this example, slider.jpg is indeed being gzipped.

enter image description here

Compare that to this very page that you are on and look at a png file, you will see no such designation.

enter image description here

Just to be clear, it isn't because one is a jpg and one is a png. It is because one is gzipped and the other one isn't.


Previous Answer

In Chrome, if you pull up the Developer Tools and go to the Network tab, then it will show the following if there is no compression:

enter image description here

And the following if there IS compression:

enter image description here

In other words, the same number, top and bottom, means no compression.

查看更多
干净又极端
3楼-- · 2019-01-12 18:09

See in the response headers. In FireFox you may check with Firebug.

Content-Encoding    gzip

If server supports gzip content then this should be displayed.

查看更多
登录 后发表回答