Skip to content

feat: more frequent version checks - #16496

Merged
elliott-with-the-longest-name-on-github merged 5 commits into
version-3from
elliott/more-frequent-updated
Jul 24, 2026
Merged

elliott-with-the-longest-name-on-github merged 5 commits into
version-3from
elliott/more-frequent-updated

Conversation

@elliott-with-the-longest-name-on-github

Copy link
Copy Markdown
Contributor

closes #16469

Does a number of things to check the version more often:

  • Adds a header to responses with the version, so that any request SvelteKit initiates is an opportunity to discover the client needs an update
  • Checks the version on visibilitychange and window.focus events
  • Polls once an hour

ghost commented Jul 23, 2026 •

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from 4564957:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/45649575dbe4ad35e6b19ab698c59fe071dfe8a7

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/kit/pr/16496

ghost commented Jul 23, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4564957

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

ghost commented Jul 23, 2026

Copy link
Copy Markdown

Elliott Johnson added 2 commits July 23, 2026 17:16
@ghost
ghost merged commit a1bfeb9 into version-3 Jul 24, 2026
@ghost
ghost deleted the elliott/more-frequent-updated branch July 24, 2026 20:28
@ghost ghost mentioned this pull request Jul 24, 2026

ghost commented Jul 25, 2026

Copy link
Copy Markdown

What a DX improvement! But I am a bit confused.

  • If a new version is detected
  • AND if client-side navigation attempt did not error

A full-page reload is not triggered, correct? Since deployments could have skew protection and can function fine.

If so, out of the box, does this PR simply remove the consecutive /_app/version.json fetch on navigation error and make it a bit snappier?

Since app state's updated is now updated by default and based on user interaction, it might be better to nudge users to add "refresh and use the new version" banner.

ghost commented Jul 25, 2026

Copy link
Copy Markdown
Member

Correct, the check only happens if navigation fails. Though...

does this PR simply remove the consecutive /_app/version.json fetch on navigation error and make it a bit snappier?

...I just realised it actually doesn't. Opened #16518

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

More frequent updated checks

3 participants