You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(host-selfhost): cache-control for SPA shell vs hashed assets (#1221)
The self-hosted server served index.html with no Cache-Control, so browsers
heuristically cached the entry document across deploys and rendered a stale
UI (old bundles, still in cache) until a hard refresh. Visiting an
unvisited route (e.g. /default) fetched fresh and showed the new UI, which
looked like two different versions of the app.
Split static serving: hashed /assets/* are cached immutably, while
index.html and its SPA fallbacks are served no-cache so they always
revalidate (etag -> 304 when unchanged, fresh after a deploy).
Send correct `Cache-Control` headers for the self-hosted web app. The SPA shell (`index.html`) and its client-route fallbacks are now served with `no-cache`, so a new deploy is picked up on the next visit instead of the browser rendering a stale UI from cache until a hard refresh. Content-hashed `/assets/*` are served `immutable` and cached long-term.
0 commit comments