Created
August 23, 2025 14:45
-
-
Save pavlo-bondarchuk/4d7780ceb184a5c6ca55dec9b232615a to your computer and use it in GitHub Desktop.
browser cache for static
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 | |
| ExpiresDefault "access plus 1 month" | |
| ExpiresByType image/avif "access plus 1 year" | |
| ExpiresByType image/webp "access plus 1 year" | |
| ExpiresByType image/jpeg "access plus 1 year" | |
| ExpiresByType image/png "access plus 1 year" | |
| ExpiresByType image/gif "access plus 1 year" | |
| ExpiresByType image/svg+xml "access plus 1 year" | |
| ExpiresByType font/woff2 "access plus 1 year" | |
| ExpiresByType font/woff "access plus 1 year" | |
| ExpiresByType text/css "access plus 1 year" | |
| ExpiresByType application/javascript "access plus 1 year" | |
| </IfModule> | |
| <IfModule mod_headers.c> | |
| <FilesMatch "\.(avif|webp|jpe?g|png|gif|svg|css|js|woff2?)$"> | |
| Header set Cache-Control "public, max-age=31536000, immutable" | |
| </FilesMatch> | |
| <FilesMatch "\.(html|php)$"> | |
| Header set Cache-Control "no-cache, no-store, must-revalidate" | |
| </FilesMatch> | |
| </IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment