# Compress output to make pages smaller
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/atom_xml
AddOutputFilterByType DEFLATE application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent env=!dont-vary
# Remove ETag Headers
Header unset ETag
FileETag None
# Set Cache-Control, but only if not already set!
SetEnvIf !Cache-Control value NO_CACHE_CONTROL
Header set Cache-Control "public" env=NO_CACHE_CONTROL
ExpiresActive On
ExpiresDefault "now"
# Media files
ExpiresByType image/gif "access plus 1 week"
ExpiresByType image/png "access plus 1 week"
ExpiresByType image/jpg "access plus 1 week"
ExpiresByType image/jpeg "access plus 1 week"
ExpiresByType video/ogg "access plus 1 week"
ExpiresByType audio/ogg "access plus 1 week"
ExpiresByType video/mp4 "access plus 1 week"
ExpiresByType video/webm "access plus 1 week"
ExpiresByType image/x-icon "access plus 1 week"
# Fonts
ExpiresByType application/x-font-ttf "access plus 1 week"
ExpiresByType font/opentype "access plus 1 week"
ExpiresByType application/x-font-woff "access plus 1 week"
ExpiresByType image/svg+xml "access plus 1 week"
ExpiresByType application/vnd.ms-fontobject "access plus 1 week"
# Static assets
ExpiresByType text/css "access plus 1 week"
ExpiresByType application/javascript "access plus 1 week"
ExpiresByType text/javascript "access plus 1 week"
# Feeds can be cached, but not too long
ExpiresByType application/rss+xml "access plus 1 hour"
ExpiresByType application/atom+xml "access plus 1 hour"