fix(web-ui): CSS must-revalidate so deploys aren't masked by browser cache #22

Merged
zgaetano merged 1 commit from fix/css-cache-revalidate into main 2026-05-23 15:41:17 -04:00
Owner

Summary

Nginx was serving CSS with expires 1y; Cache-Control: public, immutable. Combined with version-less <link href="styles-rest.css"> in index.html, every browser permanently pinned whatever stylesheet it cached first — so the schedule calendar rendered as a vertical stack of weekday names because the cached CSS pre-dated the .cal-* rules.

Move CSS into the same bucket as JS: must-revalidate via ETag. Fonts, icons, and raster assets stay in the 1y immutable bucket.

Test plan

  • Deploy, reload the schedule page without manually clearing cache — calendar grid renders as a 7-column month
  • curl -sI .../styles-rest.css shows Cache-Control: no-cache, must-revalidate
  • curl -sI .../img/dragon-logo.png still shows immutable

🤖 Generated with Claude Code

## Summary Nginx was serving CSS with `expires 1y; Cache-Control: public, immutable`. Combined with version-less `<link href="styles-rest.css">` in `index.html`, every browser permanently pinned whatever stylesheet it cached first — so the schedule calendar rendered as a vertical stack of weekday names because the cached CSS pre-dated the `.cal-*` rules. Move CSS into the same bucket as JS: `must-revalidate` via ETag. Fonts, icons, and raster assets stay in the 1y immutable bucket. ## Test plan - [ ] Deploy, reload the schedule page without manually clearing cache — calendar grid renders as a 7-column month - [ ] `curl -sI .../styles-rest.css` shows `Cache-Control: no-cache, must-revalidate` - [ ] `curl -sI .../img/dragon-logo.png` still shows `immutable` 🤖 Generated with [Claude Code](https://claude.com/claude-code)
zgaetano added 1 commit 2026-05-23 15:40:53 -04:00
Nginx was serving css with `expires 1y; Cache-Control: public, immutable`,
which combined with version-less <link href="styles-rest.css"> meant every
browser permanently pinned whatever stylesheet it cached first. Users were
seeing pre-polish-round-2 CSS even after the new image was deployed —
the calendar grid rendered as a vertical stack of weekday names because
the .cal-* rules didn't exist in the cached file.

Move css into the same bucket as js: must-revalidate via ETag. Fonts,
icons, and raster assets stay in the immutable 1y bucket since they don't
change between deploys.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
zgaetano merged commit 674dccca4e into main 2026-05-23 15:41:17 -04:00
zgaetano deleted branch fix/css-cache-revalidate 2026-05-23 15:41:17 -04:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: WildDragonLLC/dragonflight#22
No description provided.