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 mod_headers.c>
Header append Vary User-Agent env=!dont-vary
<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

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 Facebook0Share on Google+0Tweet about this on TwitterShare on StumbleUpon0Share on LinkedIn0Share on Tumblr0Pin on Pinterest0Email 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 *