Last active
September 30, 2016 09:42
-
-
Save mahdiyazdani/42d907f42946515538319b80e314d184 to your computer and use it in GitHub Desktop.
Add Expire Headers to WordPress
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 – Add Expire Headers to WordPress | |
# BEGIN Expire headers | |
<ifModule mod_expires.c> | |
ExpiresActive On | |
ExpiresDefault "access plus 5 seconds" | |
ExpiresByType image/x-icon "access plus 2592000 seconds" | |
ExpiresByType image/jpg "access plus 1 year" | |
ExpiresByType image/jpeg "access plus 1 month" | |
ExpiresByType image/png "access plus 1 month" | |
ExpiresByType image/gif "access pplus 1 month" | |
ExpiresByType application/x-shockwave-flash "access plus 1 month" | |
ExpiresByType text/css "access plus 604800 seconds" | |
ExpiresByType text/javascript "access plus 216000 seconds" | |
ExpiresByType application/pdf "access plus 1 month" | |
ExpiresByType application/javascript "access plus 216000 seconds" | |
ExpiresByType application/x-javascript "access plus 216000 seconds" | |
ExpiresByType text/html "access plus 600 seconds" | |
ExpiresByType application/xhtml+xml "access plus 600 seconds" | |
</ifModule> | |
# END Expire headers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment