Skip to content
Discussion options

You must be logged in to vote

No. Client-side navigations don't trigger an update check, neither from the browser nor from SvelteKit. Browsers check for a new worker on full-page navigations within scope and on functional events like push and sync, and an SPA route change is neither. SvelteKit itself calls registration.update() in exactly two places, and both are error recovery rather than routine navigation. When a route module fails to load, or a navigation lands on a 400+ status, kit asks its version poller whether a new deployment happened, updates the service worker if so, and then falls back to a full-page navigation anyway.

So yes, if you want the worker to pick up new versions as users navigate, trigger it you…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@korywka
Comment options

@teemingc
Comment options

Answer selected by korywka
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants