php - Is there a way to determine if a page is compressed or not? -


I am writing a script that can determine whether a page is compressed or not, and I'm doing a bit Research and can not figure out how a page is compressed or not. I thought that in order to compress a page, there should be something in the header that it is a compressed file like content type or something like that.

Any help is appreciated.

This is actually content-encoding . Depending on the type of compression, it may be gzip (or x-gzip ), deflate or compress In case of compressed data.

Excerpt:

Optionally "Content-Encoding" / "Accept-Encoding" and "Transfer-Encoding" / "Te" Header in HTTP / 1.1 Allows to send compressed requests to get compressed HTTP responses (and less common). Specification for HTTP / 1.1 (RFC 2616) specifies three compression methods: "jizip" (RFC 1952; material wrapped in GPIP stream), "Deflate" (RFC1950; content that is a zlib-format Encoded format produced by the general Unix file compression program "sec". This format is an adaptive limp-zvi welch code, which is encoded in the stream), and "compressed" (RFC 2616 is explained in section 3.5) The Ng (Eljedblu). ") Many client libraries, browser and server support platform (Apache and Microsoft IIS gzip including).


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -