开发者

How reliable is HTTP compression using gzip?

YSlow has suggested that I use HTTP compression to improve the performance of my site. However, as noted by Yahoo that are some problems.

There are known issues with browsers and proxies that may cause a mismatch in what the browser expects and what it receives with regard to compressed content. Fortunately, these edge cases are dwindling as the use of older browsers drops off. The Apache modules help out by adding appropriate Vary response headers automatically.

I understand that the most common problem occurs with IE6 behind a proxy. But how common are these problems today? To quantify it, roughly what percentage of web users experience bugs with HTT开发者_运维百科P compression?


According to Apache’s recommended example for the use of mod_deflate, the only user agents that lack proper support are:

[…] Netscape Navigator version of 4.x. These versions cannot handle compression of types other than text/html. The versions 4.06, 4.07 and 4.08 also have problems with decompressing html files. Thus, we completely turn off the deflate filter for them.

Any other browser – especially all modern browsers – should support compression properly.


While I don't have statistics on which clients can/can't use compression, I think it's worth noting that with IIS7 the default changed to have Http compression on (for static content), which at least shows how Microsoft feels about the safety of using it. Dynamic content is still disabled, but this is to save CPU cycles more than client compatibility.

Some IIS7 specific data can be found here, although I suspect you would find similar performance characteristics for other web servers.

I make a point to turn on compression on every site. I have yet to have any reported issues.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜