fix(dev-deploy): explicit Cache-Control on the UI surface #18
Reference in New Issue
Block a user
Delete Branch "feature/caddy-cache-headers"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
file_serverfalls back to heuristic caching (Last-Modified based), which leaves staleindex.html+ chunks cached for minutes-to-hours on the long-lived dev environment. On Safari that combines with stale conditional requests into a visible multi-second freeze on reload._app/immutable/*→public, max-age=31536000, immutable(hash-named, safe forever)no-cache, must-revalidate(always revalidate; fresh deploy lands on next reload)Caddyfile.devandCaddyfile.prodso prod gets the same policy when prod-deploy plumbing arrives.Test plan
caddy validateclean on both files/_app/immutable/x.js→ immutable header;/env.jsand/some/route(SPA-fallback) → no-cache headerhttps://www.galaxy.lanin Safari (non-private window) — should not freeze even with warm cache