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

ServiceWorker controller mismatch when prefetch is served #351

Open
hiroshige-g opened this issue Jan 2, 2025 · 0 comments
Open

ServiceWorker controller mismatch when prefetch is served #351

hiroshige-g opened this issue Jan 2, 2025 · 0 comments

Comments

@hiroshige-g
Copy link

This is a kind of meta issue to track the mismatch between:

  1. Controlling ServiceWorker at the time of prefetch, which is set as prefetch record's navigation param's reserved client's active service worker.
  2. Controlling ServiceWorker of the navigated Document when served by prefetch (if no fixes are made).
  3. Controlling ServiceWorker of the navigated Document that would be used without prefetch.
  4. Controlling ServiceWorker of the navigated Document after claim() when served by prefetch.

Naively I'd like to expect [2][3][4] should be the same but they can be different for several reasons:

I and @nhiroki discussed an option to compute the service worker controller at the time of navigation/prefetch record matching (==[3]) and compare it against [1], to avoid this kind of mismatch.
However, I found this might be harder than expected. This is probably doable (not sure in the short-term though) and I'll try another iteration later.

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

No branches or pull requests

1 participant