Created
April 7, 2020 08:50
-
-
Save stkjj/7354e9aced8a25778359929c26f6be1a to your computer and use it in GitHub Desktop.
Browser Cache Optimization
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
# Optimize cache-control | |
<IfModule mod_expires.c> | |
ExpiresActive on | |
ExpiresDefault “access plus 1 month” | |
ExpiresByType image/gif “access plus 1 month” | |
ExpiresByType image/png “access plus 1 month” | |
ExpiresByType image/jpg “access plus 1 month” | |
ExpiresByType image/jpeg “access plus 1 month” | |
ExpiresByType text/html “access plus 3 days” | |
ExpiresByType text/xml “access plus 1 seconds” | |
ExpiresByType text/plain “access plus 1 seconds” | |
ExpiresByType application/xml “access plus 1 seconds” | |
ExpiresByType application/rss+xml “access plus 1 seconds” | |
ExpiresByType application/json “access plus 1 seconds” | |
ExpiresByType text/css “access plus 1 week” | |
ExpiresByType text/javascript “access plus 1 week” | |
ExpiresByType application/javascript “access plus 1 week” | |
ExpiresByType application/x-javascript “access plus 1 week” | |
ExpiresByType image/x-ico “access plus 1 year” | |
ExpiresByType image/x-icon “access plus 1 year” | |
ExpiresByType application/pdf “access plus 1 month” | |
<IfModule mod_headers.c> | |
Header unset ETag | |
Header unset Pragma | |
Header unset Last-Modified | |
Header append Cache-Control “public, no-transform, must-revalidate” | |
Header set Last-modified “Mon, 1 Oct 2018 10:10:10 GMT” | |
</IfModule> | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment