How can I tell if my server is serving GZipped content?

后端 未结 6 1943
逝去的感伤
逝去的感伤 2020-12-04 05:56

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

6条回答
  •  半阙折子戏
    2020-12-04 06:20

    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.

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

    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.

提交回复
热议问题