Created
October 16, 2017 20:14
-
-
Save alexmoise/717239924ecebe810b910ec77076a10b to your computer and use it in GitHub Desktop.
Assets expiration headers for use in .htaccess
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
# Expire headers | |
<IfModule mod_expires.c> | |
# Enable expirations | |
ExpiresActive On | |
# Default directive | |
ExpiresDefault "access plus 1 month" | |
# My favicon | |
ExpiresByType image/x-icon "access plus 1 year" | |
# Images | |
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" | |
# CSS | |
ExpiresByType text/css "access plus 1 month" | |
# Javascript | |
ExpiresByType application/javascript "access plus 1 year" | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment