Question

I am using mod_defalte, as so:

<IfModule mod_deflate.c> 
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE image/svg+xml
  AddOutputFilterByType DEFLATE image/x-icon
</IfModule>

I am wondering, but cannot find the answer to: Does the above mean all content that matches those rules will be gzipped to any request? Or does mod_defalte on compress when the HTTP request states it can accept gzip?

Further, I am reading some posts where people are disabling certain browsers with bugs in their gzip implementation. But there is no explanation for this. Does anyone have a definitive set of rules for this. Or is it not needed?

Was it helpful?

Solution

mod_deflate is capable of compressing using gzip encoding.

Sometimes the module skips certain files because they are either too small or thought to have no significant gain.

The request header tells the server whether to compress or not.

Most of the bugs are related to proxy server on the client side where gzipped content is cached because a browser that accepts the encoding requested a resource first, but other browsers behind the same cache cannot. This is the reason to use the Vary header.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top