Snapshots are not restored when navigating routes
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 20.8k
- Forks
- 2.3k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 156
Description
Describe the bug
The repro uses example code from https://kit.svelte.dev/docs/snapshots.
Refreshing the browser does trigger a restore, but following links does not.
Reproduction
https://stackblitz.com/edit/sveltejs-kit-template-default-51onsx?file=src/routes/post/+page.svelte
Logs
No response
System Info
System:
OS: macOS 13.3
CPU: (8) arm64 Apple M1
Memory: 388.70 MB / 16.00 GB
Shell: 3.6.0 - /opt/homebrew/bin/fish
Binaries:
Node: 18.14.2 - ~/Library/Caches/fnm_multishells/5166_1677921066571/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 9.5.0 - ~/Library/Caches/fnm_multishells/5166_1677921066571/bin/npm
Browsers:
Chrome: 110.0.5481.177
Firefox: 110.0.1
Firefox Developer Edition: 111.0
Safari: 16.4
npmPackages:
@sveltejs/adapter-auto: ^2.0.0 => 2.0.0
@sveltejs/adapter-vercel: ^2.3.0 => 2.3.0
@sveltejs/kit: ^1.10.0 => 1.10.0
svelte: ^3.55.1 => 3.55.1
vite: ^4.1.4 => 4.1.4
Severity
annoyance
Additional Information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the snapshots documentation and reproduce the behavior using the linked StackBlitz project, especially src/routes/post/+page.svelte. Compare browser refresh with following links between routes, then verify that the snapshot is restored during navigation as well as on refresh.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100