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