A deploy's stylesheet does not reach a browser for a day #239

closed cmc opened this on 2026-09-20 06:48 UTC

Discussion

cmc 2026-09-20 06:48 UTC

/static/style.css is served public, max-age=86400, must-revalidate at an unversioned URL. must-revalidate only forces a check once freshness expires, so for 24 hours after its last fetch a browser renders the new markup against its old stylesheet. The ETag from #132 is never consulted inside that window.

Seen on a phone minutes after v1.31.0 deployed: the rail carried the new markup while the cached sheet predated !440, so .railopt, .railmore and .raildrop had no rules. Every icon showed instead of collapsing to five, the More menu appeared at a width that hides it, and its drop rendered as a line of inline links across the rail. A hard reload fixed it.

Stamp the served bytes' hash on the URL. A deploy then changes the URL, so a cached copy cannot be reused, and the versioned URL can be cached without revalidation at all.

closed by cmc in commit 2538f3fdc6: httpd: stamp the stylesheet hash on its URL

2026-09-20 07:07 UTC

referenced in commit cfeb70f956 by cmc: CHANGELOG: v1.31.1

2026-09-20 08:14 UTC