Created
March 25, 2015 16:33
-
-
Save andrebian/cbdb11799bb4e60f32df to your computer and use it in GitHub Desktop.
Um .htaccess para melhoras significativas de pagespeed
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
# Ativando compactação | |
<FilesMatch ".(js|css|html|htm|php|xml)$"> | |
SetOutputFilter DEFLATE | |
</FilesMatch> | |
# Ativando cache no browser | |
<IfModule mod_expires.c> | |
ExpiresActive on | |
# Perhaps better to whitelist expires rules? Perhaps. | |
ExpiresDefault "access plus 1 week" | |
# Favicon (cannot be renamed) | |
ExpiresByType image/x-icon "access plus 1 month" | |
# HTC files (css3pie) | |
ExpiresByType text/x-component "access plus 1 month" | |
# Webfonts | |
ExpiresByType font/truetype "access plus 1 month" | |
ExpiresByType font/opentype "access plus 1 month" | |
ExpiresByType application/x-font-woff "access plus 1 month" | |
ExpiresByType image/svg+xml "access plus 1 month" | |
ExpiresByType application/vnd.ms-fontobject "access plus 1 month" | |
# CSS and JavaScript | |
# ExpiresByType text/css "access plus 1 week" | |
# ExpiresByType application/javascript "access plus 1 week" | |
# ExpiresByType text/javascript "access plus 1 week" | |
# Para ativar cache de js e css descomente as linhas acima | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment