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
{{ message }}
Repository navigation
Recover Pages navigation gracefully across application deployments #849
An already-open tab can fail during SPA navigation after a new deployment. It would be good to have a default handling (which can be disabled) to handle this case by default.
Reproduction
Deploy an application with multiple pages and open it.
Leave the tab open.
Change a page or shared component and deploy the application again (=> new chunk hashes)
In the existing tab, navigate to a page whose chunks have not been loaded.
The client requests the old version's chunks, which may now return 404. Recovery can also fail if the error component needs a missing chunk.
Expected behavior
An intentional navigation should recover to its requested destination when the client can establish that a different application version is required.
The query string and fragment should survive, and the current page should remain visible until recovery starts.
Prefetch should never reload the tab.
Network failures should not be treated as deployment changes
Never replay mutations automatically
No additional checks for healthy navigations (no slowdown)
State of the Art in toher frameworks
Inertia’s protocol provides prior art for version negotiation, GET navigation fallback and background request handling. SvelteKit’s version management provides prior art for detecting a new build and recovering from a page-load failure.
Solution ideas
The shared Pages router and server transport could support application version negotiation and load recovery
The existing X-VoidPages-Version check already covers the wire format. An application version would address regular deployments that change components or page props (no protocol changes).
Version information could travel with existing page requests and responses. The router can do the rest (check compat, handle import failures while keeping state etc)
Activity