Last active
August 29, 2015 14:26
-
-
Save skinofstars/a53a2a6ee902f1da390b to your computer and use it in GitHub Desktop.
Some casual .htaccess gzip action
This file contains hidden or 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
# normal rules before this | |
Options -Indexes | |
Header unset ETag | |
FileETag None | |
#Gzip | |
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript | |
AddType x-font/woff .woff | |
#End Gzip | |
# Add correct content-type for fonts | |
AddType application/vnd.ms-fontobject .eot | |
AddType application/x-font-ttf .ttf | |
AddType application/x-font-opentype .otf | |
AddType application/x-font-woff .woff | |
AddType image/svg+xml .svg | |
# Compress compressible fonts | |
AddOutputFilterByType DEFLATE application/x-font-ttf application/x-font-opentype image/svg+xml | |
ExpiresActive On | |
ExpiresByType image/jpg "access plus 1 month" | |
ExpiresByType image/jpeg "access plus 1 month" | |
ExpiresByType image/gif "access plus 1 month" | |
ExpiresByType image/png "access plus 1 month" | |
ExpiresByType text/css "access plus 1 month" | |
ExpiresByType application/pdf "access plus 1 month" | |
ExpiresByType text/x-javascript "access plus 1 month" | |
ExpiresByType application/javascript "access plus 1 month" | |
ExpiresByType application/x-javascript "access plus 1 month" | |
ExpiresByType text/javascript "access plus 1 month" | |
ExpiresByType application/x-shockwave-flash "access plus 1 month" | |
ExpiresByType image/x-icon "access plus 1 year" | |
ExpiresDefault "access plus 3 days" | |
# Add a far future Expires header for fonts | |
ExpiresByType application/vnd.ms-fontobject "access plus 1 year" | |
ExpiresByType application/x-font-ttf "access plus 1 year" | |
ExpiresByType application/x-font-opentype "access plus 1 year" | |
ExpiresByType application/x-font-woff "access plus 1 year" | |
ExpiresByType image/svg+xml "access plus 1 year" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment