sveltejs / sveltejs/kit

Can the documentation please describe "x-sveltekit-invalidated"

Open
#13,628 1 comment 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation
Dominant language
JavaScript
Stars
20.8k
Forks
2.3k
Avg merge
1d 16h
Merged PRs (30d)
156

Description

Describe the bug

I write a PWA and get an error "The FetchEvent for "https://.../__data.json?x-sveltekit-invalidated=1" resulted in a network error response: the promise was rejected." I googled x-sveltekit-invalidated and found nothing except two issues that seem unrelated. Should the sveltekit docs not describe this message somewhere?
Right now, I am quite disappointed that my PWA does not really work offline, as promised.

Reproduction

https://github.com/michaelu123/nk
I start the app with npm run preview, then start ngrok with port 4173, then I start the installed app on a phone, then I disable the network, then I click on a map marker to display more info about the location (all data being in IndexedDB), then I get the error. If I enable the network, display the data, disable the network, and display the data again, it works, for some time. But I want to understand what x-sveltekit-invalidated is about.

Logs

System Info
Android, App installed from result of npm run build, npm run preview, resp. npm run dev
Severity

annoyance

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked reproduction and its npm run preview, npm run build, and npm run dev flows, then observe the offline PWA request containing x-sveltekit-invalidated. Document what that message means and how it relates to the reported IndexedDB and offline interaction, with the explanation verified against the described Android reproduction.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation, web-dev
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.