Skip to content
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

[chore] upgrade @cloudflare/kv-asset-handler #2650

Merged

Conversation

pzuraq
Copy link
Contributor

@pzuraq pzuraq commented Oct 20, 2021

We've recently run into a bug serving static HTML pages alongside our
Svelte app (legacy codebase, working on removing these pages but it
takes time) with the following characteristics:

  1. First load of a page to behave/run JS one way
  2. Refresh/second load of the page using cached assets behave a
    completely different way

This bug appears to only affect webkit desktop browsers, and the page
works again if you empty cache and hard reload. We've been able to serve
the exact same assets from a simpler Cloudflare worker and everything
works as expected, and we've verified that:

  1. LocalStorage values are not the culprit
  2. Cookies are not used
  3. Session state is not used
  4. Headers are exactly the same, in Chrome devtools
  5. Responses codes and values are exactly the same, in Chrome devtools

Manually updating this package appears to fix things, and we're not
exactly sure why yet, but it seemed like it would be a good thing to do
upstream so that everyone is on the latest. Still digging to try to find
a root cause.

We've recently run into a bug serving static HTML pages alongside our
Svelte app (legacy codebase, working on removing these pages but it
takes time) with the following characteristics:

1. First load of a page to behave/run JS one way
2. Refresh/second load of the page using cached assets behave a
   completely different way

This bug appears to only affect webkit desktop browsers, and the page
works again if you empty cache and hard reload. We've been able to serve
the exact same assets from a simpler Cloudflare worker and everything
works as expected, and we've verified that:

1. LocalStorage values are not the culprit
2. Cookies are not used
3. Session state is not used
4. Headers are exactly the same, in Chrome devtools
5. Responses codes and values are exactly the same, in Chrome devtools

Manually updating this package appears to fix things, and we're not
exactly sure why yet, but it seemed like it would be a good thing to do
upstream so that everyone is on the latest. Still digging to try to find
a root cause.
@changeset-bot
Copy link

changeset-bot bot commented Oct 20, 2021

🦋 Changeset detected

Latest commit: bf2ce66

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

This PR includes changesets to release 1 package
Name Type
@sveltejs/adapter-cloudflare-workers Patch

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

@benmccann benmccann changed the title Bumps @cloudflare/kv-asset-handler [chore] upgrade @cloudflare/kv-asset-handler Oct 20, 2021
@benmccann benmccann merged commit 66b8d4b into sveltejs:master Oct 20, 2021
@pzuraq pzuraq deleted the bump-cloudflare-workers-kv-asset-handler branch October 20, 2021 15:41
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.

2 participants