-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/_app/version.json
is marked immutable
and cached forever
#4837
Comments
Looks like #3222 assumed that everything in |
Thanks @geoffrich, that’s the problem for sure. I don’t know what the team’s definition of ‘_app’ is, so I’ll wait for someone to advise rather than open a speculative PR. |
Are you experiencing buggy behaviour, or is it just that you don't expect the kit/packages/kit/src/runtime/client/utils.js Lines 87 to 94 in 82cd1d7
|
@Rich-Harris Can confirm it doesn't work behind a CDN. File never updates (tested with Google Cloud CDN). |
Thanks for this. I think I might be wrong - I wasn't aware the request could cache-bust an immutable resource like this. TBH, I can't find this trick explicitly documented anywhere online, and the I did however see some buggy behaviour, but it could be with userland code. I'll try and get a reduced test case. |
Ah, interesting — I thought if a CDN received a |
* put build inside _app/build directory * use free variable for native fetch * update test * only serve _app/build with immutable cache header, not _app/version.json - fixes #4837 * Update .changeset/wise-berries-flash.md * fix is_static_file * rename /build/ to /immutable/ * Update packages/kit/src/core/preview/index.js * Update packages/kit/src/core/build/build_client.js * Update packages/adapter-netlify/src/edge.js * Update .changeset/wise-berries-flash.md * update test * fix cloudflare adapters
Describe the bug
As mentioned in #4188 (comment), I suspect recent changes to the way that
/_app/version.json
is served have caused it to be treated as a static asset.Reproduction
See this simple repro: https://stackblitz.com/edit/sveltejs-kit-template-default-nwjzok?file=package.json&terminal=dev
The offending network requests are visible every 10 seconds:
Example request
Example response headers
A
immutable
cached response forversion.json
means my app will always believe there's an upgrade pending, as the browser has cached the initial version response.Logs
No response
System Info
See StackBlitz container - the
npx envinfo
command didn't run to completion.Severity
blocking an upgrade
Additional Information
No response
The text was updated successfully, but these errors were encountered: