Last active
March 29, 2023 17:50
-
-
Save tearstains/318ba4acbfdeaa05b2acf6c97707b1b1 to your computer and use it in GitHub Desktop.
cache-control headers for 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
| # cache-control headers | |
| <ifModule mod_headers.c> | |
| # One year for image files | |
| <filesMatch ".(gif|ico|jpg|jpeg|png|svg|webp)$"> | |
| Header set Cache-Control "max-age=31536000, public" | |
| </filesMatch> | |
| # One year for JavaScript and CSS files | |
| <filesMatch ".(js|css)$"> | |
| Header set Cache-Control "max-age=31536000, public" | |
| </filesMatch> | |
| </ifModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment