Created
May 9, 2013 01:00
-
-
Save Dare-NZ/5544820 to your computer and use it in GitHub Desktop.
The .htaccess I used to max out googles page speed score
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
<IfModule mod_expires.c> | |
ExpiresActive On | |
ExpiresDefault "access plus 200 hours" | |
ExpiresDefault "access plus 1 month" | |
ExpiresByType application/javascript "access plus 1 week" | |
ExpiresByType text/javascript "access plus 1 week" | |
ExpiresByType application/x-shockwave-flash A3600 | |
<IfModule mod_headers.c> | |
Header append Cache-Control "public" | |
</IfModule> | |
</IfModule> | |
<ifModule mod_deflate.c> | |
# compress text, html, javascript, css, xml: | |
AddOutputFilterByType DEFLATE text/plain | |
AddOutputFilterByType DEFLATE text/html | |
AddOutputFilterByType DEFLATE text/xml | |
AddOutputFilterByType DEFLATE text/css | |
AddOutputFilterByType DEFLATE application/xml | |
AddOutputFilterByType DEFLATE application/xhtml+xml | |
AddOutputFilterByType DEFLATE application/rss+xml | |
AddOutputFilterByType DEFLATE application/javascript | |
AddOutputFilterByType DEFLATE application/x-javascript | |
# Or, compress certain file types by extension: | |
<files *.html> | |
SetOutputFilter DEFLATE | |
</files> | |
</IfModule> | |
<ifModule mod_headers.c> | |
Header set Connection keep-alive | |
</ifModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment