Difference between mod_deflate and zlib.output_compression

Most of the SEO, Developers are concern about the website load time, and question about the compression from the server end.
The compression is achieved from both PHP zlib output_compression and Apache's mod_gzip (old Apache version) , mod_deflate.
But the one question remains unanswered is that which compression method gives good compression.
this post is going to cover the same question.

mod_gzip or mod_deflate  : The mod_gzip or mod_deflate is supported by Apache and almost compresses all the files including the style sheets.
The compression percentage is good as compared to PHP's zlib output_compression.

<IfModule mod_deflate.c>
<IfModule mod_setenvif.c>
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
</IfModule>
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE text/css application/x-javascript text/x-component text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon
</IfModule>
</IfModule>

zlib.output_compression : The zlib.output_compression is supported by PHP and compresses only PHP handler pages hence proves less effective.

zlib.output_compression On

Hope, the post helps to clear the doubts. 🙂

Share on Facebook0
Share on Google+4Tweet about this on TwitterShare on StumbleUpon0Share on LinkedIn0Share on Tumblr0Digg thisPin on Pinterest0Share on Reddit0Email this to someonePrint this page

About Abhijit Sandhan

Abhijit Sandhan
Loves Linux, Blogging, Traveling, Hiking and sharing knowledge!

One comment

  1. Great work Abhijit!!

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA