Search code examples
compressionbandwidthhttp-compression

Any reasons not to gzip documents delivered via HTTP?


I remember someone telling me that gzipped content is not cached on some browsers? is this true?

Are there any other reasons why I shouldn't gzip my content (pages, javascript and css files) with htaccess?


Solution

  • The other reason is it obviously increase CPU load, but whether this is a problem depends on your content type and your traffic.

    If you are going to use GZip from with .htaccess, be sure to wrap it in a condition whereby it only executed of the mod_gzip module exists, this will make the site / app more portable if moving it to another server.

    If you opt to use .htaccess GZipped content the browser will receive compressed content if it supports it, or received the normal uncompressed version if it doesn't