@@ -19,19 +19,14 @@ DirectoryIndex index.html
|
||||
# Optional: small caching hints for static assets
|
||||
<IfModule mod_expires.c>
|
||||
ExpiresActive On
|
||||
ExpiresByType text/css "access plus 1 week"
|
||||
# Keep JS cache short during development to avoid stale scripts on mobile
|
||||
ExpiresByType application/javascript "access plus 60 seconds"
|
||||
ExpiresByType image/* "access plus 1 week"
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_headers.c>
|
||||
# Add Cache-Control headers for more precise control
|
||||
<FilesMatch "\.js$">
|
||||
Header set Cache-Control "max-age=60, public"
|
||||
</FilesMatch>
|
||||
<FilesMatch "\.css$">
|
||||
Header set Cache-Control "max-age=604800, public"
|
||||
# No caching for app files — always fetch fresh
|
||||
<FilesMatch "\.(html|htm|js|css|json)$">
|
||||
Header set Cache-Control "no-store, no-cache, must-revalidate"
|
||||
Header set Pragma "no-cache"
|
||||
</FilesMatch>
|
||||
<FilesMatch "\.(png|jpg|jpeg|gif|svg)$">
|
||||
Header set Cache-Control "max-age=604800, public"
|
||||
|
||||
Reference in New Issue
Block a user