I recently discovered [mod_deflate], which compresses webserver content before sending it out – if you’re not using it you should really check it out. I turned it on and it worked flawlessly for me, with two exceptions.
- Server-side includes
These just did not play well together out of the box…
- PHP and Perl “streaming” output
I have some scripts, most notably imagescraper, that need to stream the html in the results page as it is computed, not all at once AFTER it is built, as mod_deflate requires.
Turning off [mod_deflate] is trivial. I used the no-gzip environment variable as follows:
# MDM This is to disable [mod_deflate] for imagescraper, so we don't try to compress the streaming results... <Files images_google.pl> SetEnv no-gzip 1 </Files> # MDM Drop this into a virtual host block to TURN OFF [mod_deflate], so it doesn't break SSI. SetEnv no-gzip 1