Why does Safari not accept GZIP compression?

前端 未结 3 1931
孤独总比滥情好
孤独总比滥情好 2021-01-18 13:50

I have a pretty big JavaScript file here which I want to embed into my website. The HTTP server is smart enough to GZIP the file before delivering it to the browser.

3条回答
  •  不要未来只要你来
    2021-01-18 14:18

    The HTTP headers sent to Safari say it's compressed (It has the Content-Encoding: gzip header, and it says the Content-Length is 119406 bytes) - I'd trust those more than the bold number saying 430.61 in Web Inspector. How it determines both those numbers in the top column, , I don't know.

    You can get verification on how many bytes is going over the wire if you sniff the HTTP request with wireshark.

提交回复
热议问题