Last active
December 16, 2015 16:08
-
-
Save Kaapiii/5460488 to your computer and use it in GitHub Desktop.
.htaccss performance boost
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
#Gzip | |
<ifmodule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript | |
</ifmodule> | |
#End Gzip | |
## EXPIRES CACHING ## | |
<IfModule mod_expires.c> | |
ExpiresActive On | |
# Images | |
ExpiresByType image/gif "access plus 1 months" | |
ExpiresByType image/jpeg "access plus 1 months" | |
ExpiresByType image/png "access plus 1 months" | |
ExpiresByType image/x-icon "access 1 year" | |
# Media | |
ExpiresByType application/x-shockwave-flash "access 1 month" | |
ExpiresByType video/ogg "access plus 1 month" | |
ExpiresByType audio/ogg "access plus 1 month" | |
ExpiresByType video/mp4 "access plus 1 month" | |
ExpiresByType application/rss+xml "access plus 1 hour" | |
# html / css / js | |
ExpiresByType text/css "access plus 14 days" | |
ExpiresByType text/javascript "access plus 14 days" | |
ExpiresByType application/javascript "access plus 14 days" | |
# webfonts | |
ExpiresByType font/ttf "access plus 1 month" | |
ExpiresByType font/woff "access plus 1 month" | |
ExpiresByType image/svg+xml "access plus 1 month" | |
ExpiresDefault "access 1 week" | |
</IfModule> | |
## EXPIRES CACHING ## |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment