Created
March 30, 2017 07:33
-
-
Save r0ckup/a5aaf0fe574ce415f18e9100b20206af to your computer and use it in GitHub Desktop.
Enable Browser Caching (Apache)
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
# Browser-Caching aktivieren | |
<IfModule mod_expires.c> | |
ExpiresActive On | |
ExpiresDefault "access plus 24 hours" | |
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 image/gif "access plus 1 month" | |
ExpiresByType image/jpeg "access plus 1 month" | |
ExpiresByType image/jpg "access plus 1 months" | |
ExpiresByType image/png "access plus 1 month" | |
ExpiresByType image/x-icon "access plus 1 month" | |
ExpiresByType application/pdf "access plus 1 month" | |
ExpiresByType image/x-icon "access plus 1 year" | |
ExpiresByType image/svg+xml "access plus 1 month" | |
ExpiresByType application/x-font-woff "access plus 1 month | |
ExpiresByType font/opentype "access plus 1 month | |
ExpiresByType application/x-font-ttf "access plus 1 month | |
ExpiresByType application/vnd.ms-fontobject "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=2592000, public" | |
</filesmatch> | |
<filesmatch "\\.(js)$"> | |
Header set Cache-Control "max-age=2592000, private" | |
</filesmatch> | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment