Next.js Change
Commit: 2839982
PR: #97505
What changed
Next.js development documents and RSC/data responses now send Cache-Control: no-store, rather than no-cache, must-revalidate. Browsers can restore a stored document during a back/forward navigation without revalidating it, which otherwise displays output from before the latest edit.
Development static assets remain no-cache, must-revalidate: they have ETags, so the browser can make a conditional request, receive 304, and reuse the cached body rather than re-download chunks on every page load.
Impact on vinext
vinext must match this response split in development for both App and Pages Router paths. HTML documents and RSC/data responses must never be stored, while static assets should remain revalidatable. This prevents a history navigation from restoring stale pre-HMR document output without unnecessarily disabling asset caching.
Acceptance criteria
Related
Next.js Change
Commit:
2839982PR: #97505
What changed
Next.js development documents and RSC/data responses now send
Cache-Control: no-store, rather thanno-cache, must-revalidate. Browsers can restore a stored document during a back/forward navigation without revalidating it, which otherwise displays output from before the latest edit.Development static assets remain
no-cache, must-revalidate: they have ETags, so the browser can make a conditional request, receive304, and reuse the cached body rather than re-download chunks on every page load.Impact on vinext
vinext must match this response split in development for both App and Pages Router paths. HTML documents and RSC/data responses must never be stored, while static assets should remain revalidatable. This prevents a history navigation from restoring stale pre-HMR document output without unnecessarily disabling asset caching.
Acceptance criteria
Cache-Control: no-store.Cache-Control: no-store.Cache-Control: no-cache, must-revalidateand continue to return304for unchanged conditional requests.Related