Cache: fix 1-year CSS cache and add version busting

- .htaccess: remove duplicate cache block that set all CSS/JS to max-age=31536000
  CSS/JS now use max-age=3600 must-revalidate (was 1 year, breaking live edits)
- index.php: bump main.min.css version v1.1.3 -> v1.1.4
- All 78 PHP files: add ?v=20260222 to main.css and cro-enhancements.css refs
  Forces browser cache bust for all pages after todays accessibility changes
This commit is contained in:
Peter Foster
2026-02-22 11:11:56 +00:00
committed by Peter Foster
parent 611a861bdd
commit 15e9ba598e
71 changed files with 121 additions and 116 deletions

View File

@@ -214,9 +214,14 @@ ServerSignature Off
# Cache-Control headers
<IfModule mod_headers.c>
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|webp|svg|js|css)$">
# Images only — long cache is safe since filenames don't change
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|webp|svg)$">
Header set Cache-Control "max-age=31536000, public"
</FilesMatch>
# CSS and JS — short cache + must-revalidate so edits propagate within 1 hour
<FilesMatch "\.(css|js)$">
Header set Cache-Control "max-age=3600, public, must-revalidate"
</FilesMatch>
<FilesMatch "\.(html|htm|php)$">
Header set Cache-Control "max-age=600, private, must-revalidate"
</FilesMatch>