-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Describe the problem
We're trying to understand why our app multiple times a day report the Failed to fetch dynamically imported module
issue to Sentry.
It seems that this is caused by the user opening a new version of the app in a new tab, which is documented on SvelteKit docs:
Cookie-based skew protection comes with one caveat: if a user has multiple versions of your app open in multiple tabs, requests from older versions will be routed to the newer one, meaning they will fall back to SvelteKit's built-in skew protection.
I may be understanding this wrong, but wouldn't the x-deployment-id
header make it so different application versions in different tabs would not be affected by the new cookie that is set? Instead of setting the cookie across all app versions, wouldn't each application be able to use the separate deployment ID's in the header from the server its connected to?
Describe the proposed solution
Using x-deployment-id
header instead of __vdpl
cookie.
Alternatives considered
SvelteKits internal Skew Protection will reload the page which "solves" the error, but why not let the application keep working with Vercel's Skew protection if it's enabled?
Importance
would make my life easier
Additional Information
No response