Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Are there any benefits to using Apache2s' mod_deflate compression over setting zlib.output_compression = On and zlib.output_compression_level = 1 in php.ini?

I'm trying to come up with a good compression strategy which compresses all PHP output, plus.css and .js files.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The compression settings in your php.ini naturally only work with PHP scripts. If you want to compress your assets too, you need to use your Apache httpd's facilities.

share|improve this answer
    
Thanks. I guess I should have asked if there is any benefit to splitting up the compression duties between PHP and Apache2, or should I just use Apache2 to compress everything? The php.ini zlib seems to compress all PHP output perfectly with very minimal CPU overhead when set to level 1. –  Jeff Dec 8 '09 at 17:15
    
Followup... my research seems to show that using zlib in php.ini instead of Apache2s' mod_deflate speeds up output of PHP a little bit. –  Jeff Dec 9 '09 at 10:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.