Created
May 15, 2013 15:40
-
-
Save seoagentur-hamburg/5584929 to your computer and use it in GitHub Desktop.
.htaccess Schnipsel der den Browser Cache auf einen Monat setzt.
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
# turns cache on for 1 month | |
<IfModule mod_expires.c> | |
ExpiresActive On | |
ExpiresByType text/css "access plus 1 month" | |
ExpiresByType text/javascript "access plus 1 month" | |
ExpiresByType text/html "access plus 1 month" | |
ExpiresByType application/javascript "access plus 1 month" | |
ExpiresByType application/x-javascript "access plus 1 month" | |
ExpiresByType application/xhtml-xml "access plus 600 seconds" | |
ExpiresByType image/gif "access plus 1 month" | |
ExpiresByType image/jpeg "access plus 1 month" | |
ExpiresByType image/png "access plus 1 month" | |
ExpiresByType image/x-icon "access plus 1 month" | |
</IfModule> | |
<ifmodule mod_headers.c> | |
<filesmatch "\\.(ico|jpe?g|png|gif|swf)$"> | |
Header set Cache-Control "max-age=2592000, public" | |
</filesmatch> | |
<filesmatch "\\.(css)$"> | |
Header set Cache-Control "max-age=604800, public" | |
</filesmatch> | |
<filesmatch "\\.(js)$"> | |
Header set Cache-Control "max-age=216000, private" | |
</filesmatch> | |
<filesmatch "\\.(x?html?|php)$"> | |
Header set Cache-Control "max-age=600, private, must-revalidate" | |
</filesmatch> | |
</ifmodule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment