Skip to content

Instantly share code, notes, and snippets.

@tjhanley
Created March 10, 2011 19:01
Show Gist options
  • Save tjhanley/864671 to your computer and use it in GitHub Desktop.
Save tjhanley/864671 to your computer and use it in GitHub Desktop.
Here are my goto settings for Apache Etags and Deflate filter
# etag configuration:
FileETag MTime Size
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ \
no-gzip dont-vary
SetEnvIfNoCase Request_URI \
\.(?:exe|t?gz|zip|bz2|sit|rar)$ \
no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
ExpiresActive On
ExpiresByType application/x-javascript "modification plus 1 month"
ExpiresByType text/css "modification plus 1 month"
ExpiresByType image/gif "modification plus 1 month"
ExpiresByType image/jpg "modification plus 1 month"
ExpiresByType image/png "modification plus 1 month"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment