Panel: index.html is cached by the browser after an upgrade (no Cache-Control) #205
Labels
No labels
Area/Backend
Area/Database
Area/Docs
Area/Frontend
Area/Infra
Area/Security
Area/Tests
Area/Tooling
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Lang/Python
Lang/Rust
Lang/Shell
Lang/SQL
Lang/TypeScript
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Routing
Auto
Routing
Hold
Routing
Human
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grimoirix/grimoire-of-digital-signage#205
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Found on the test server on 2026-11-15 (GRI-2051). After an upgrade the product owner's browser kept showing the old panel until a hard refresh.
Cause.
crates/server/src/http.rs:88serves the panel withServeDirand falls back toServeFile(index.html). Neither setsCache-Control. So a browser may reuse a cachedindex.htmlby heuristic, and that file points at the old hashedassets/index-*.js.Fix.
index.html(direct and through the SPA fallback):Cache-Control: no-cache— the browser must revalidate every time. An ETag/Last-Modified keeps that cheap (304)./assets/*(Vite output, content-hashed names):Cache-Control: public, max-age=31536000, immutable.no-cache.Acceptance. A test on
router_with_panelreads the header on/, on an SPA path such as/playlists/x, and on a hashed asset. After an upgrade, a normal reload shows the new panel.Must land before the campus deploy: the colleagues there will not know to press Ctrl+Shift+R.
PR #215 merged into dev (merge commit
712dc6c5, fix commit24038b45): crates/server/src/http.rs sets Cache-Control: no-cache on index.html (direct and SPA fallback) and public, max-age=31536000, immutable on /assets/*. Tests cover all three cases on router_with_panel. CI was fully green before merge.