Created
October 3, 2012 16:01
-
-
Save cantlin/3827806 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make sure we have MIME types set up for WOFF, EOT and TT fonts. | |
# Existing mappings for these extensions are overridden. | |
AddType application/font-woff .woff # http://www.w3.org/TR/WOFF | |
AddType application/x-font-ttf .ttf # No standard type for TT | |
AddType application/vnd.ms-fontobject .eot # iana.org/assignments/media-types/application | |
# Ensure the JS MIME type is set to what we expect. | |
AddType application/javascript .js | |
# Enable gzip compression using mod_deflate. | |
# WOFF files are already compressed (http://en.wikipedia.org/wiki/Web_Open_Font_Format). | |
AddOutputFilterByType DEFLATE text/html text/plain text/css application/javascript | |
AddOutputFilterByType DEFLATE image/svg+xml application/vnd.ms-fontobject application/x-font-ttf | |
# Set charset=utf-8 in the `Content-Type` response header. | |
AddDefaultCharset utf-8 | |
# Turn on `Expires` headers and set up type-based expiry/max-age. | |
ExpiresActive On | |
ExpiresByType application/font-woff "access plus 1 year" | |
ExpiresByType application/x-font-ttf "access plus 1 year" | |
ExpiresByType application/vnd.ms-fontobject "access plus 1 year" | |
ExpiresByType image/jpeg "access plus 30 days" | |
ExpiresByType image/png "access plus 30 days" | |
# We generally use URI-based version bumps to expire Javascript and CSS. | |
ExpiresByType text/css "access plus 3 months" | |
ExpiresByType application/javascript "access plus 3 months" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment