Last active
February 7, 2022 23:04
-
-
Save PawelGIX/55715f11c43743c3a77576c309a873b3 to your computer and use it in GitHub Desktop.
Serve static assets with an efficient cache policy lighthouse
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
| <IfModule mod_expires.c> | |
| ExpiresActive On | |
| # Images | |
| ExpiresByType image/jpeg "access plus 1 year" | |
| ExpiresByType image/gif "access plus 1 year" | |
| ExpiresByType image/png "access plus 1 year" | |
| ExpiresByType image/webp "access plus 1 year" | |
| ExpiresByType image/svg+xml "access plus 1 year" | |
| ExpiresByType image/x-icon "access plus 1 year" | |
| # Video | |
| ExpiresByType video/webm "access plus 1 year" | |
| ExpiresByType video/mp4 "access plus 1 year" | |
| ExpiresByType video/mpeg "access plus 1 year" | |
| # Fonts | |
| ExpiresByType font/ttf "access plus 1 year" | |
| ExpiresByType font/otf "access plus 1 year" | |
| ExpiresByType font/woff "access plus 1 year" | |
| ExpiresByType font/woff2 "access plus 1 year" | |
| ExpiresByType application/font-woff "access plus 1 year" | |
| # CSS, JavaScript | |
| ExpiresByType text/css "access plus 1 year" | |
| ExpiresByType text/javascript "access plus 1 year" | |
| ExpiresByType application/javascript "access plus 1 year" | |
| # Others | |
| ExpiresByType application/pdf "access plus 1 year" | |
| ExpiresByType image/vnd.microsoft.icon "access plus 1 year" | |
| </IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment