Author: Piet Delport
Date: 07-03-05 11:21
The reason it doesn't work yet is probably because mod_gzip ignores chunked responses[1] by default. The following http.conf-snippet from a server of mine enables dechunking[2], and provides a minimized set of directives for handling nearly all content that should be reasonably compressible:
<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include mime ^text/
mod_gzip_item_include mime ^httpd/unix-directory
mod_gzip_item_include mime ^application/.*xml
mod_gzip_item_include mime ^application/x-javascript
</IfModule>
It's great that this is being added!
Footnotes:
[1] Chunked encoding is where the server sends the body of the HTTP response as a series of length-prefixed "chunks", instead of the Content-Length header. Programs like PHP use this so that they can start sending dynamically-generated responses before knowing their total length.
[2] mod_gzip's design does not allow it to compress content on the fly, so it (optionally) deals with chunked responses by compressing the entire response on the server side, and then sending it as a normal non-chunked (but compressed) response.
|
|