No-Vary-Search can cause reserved client creation URL mismatch #350
Labels
bug
The spec is broken or misaligned with the implementation in some way
in progress
The ideas discussed in this issue are actively being worked on in either implementation or spec
prefetch
Related to prefetching
When the prefetch is served using No-Vary-Search matching (which is not yet specified yet?), the navigation param's reserved client's creation URL doesn't match with the navigation URL.
For example,
/page?param=1
. The server responds withNo-Vary-Search: "param"
response header./page?param=2
. The prefetched response is served due to the No-Vary-Search header.Then the resulting Window's settings object's creation URL is
/page?param=1
, because in the current spec it is derived from the prefetch's navigation param's reserved client.The observable behavior change includes controlling ServiceWorker: if we register two service workers (that just fall back to the network) with scopes
/page?param=1
and/page?param=2
, respectively, which service worker should be the controller of the resulting page?In the current spec, the controller would be the service worker with scope
/page?param=1
(which is set during prefetch), and remains the same even after e.g.claim()
(because settings object's creation URL itself is also/page?param=1
), while it would be the service worker with scope/page?param=2
without the prefetch.Candidate soloutions (just brainstorming, not yet sure at all):
/page?param=2
afterclaim()
.claim()
)? But this needs going through ServiceWorker registration lookup etc. again, and I have to plumb a new path to Match Service Worker Registration, and I'm not sure this isn't something that can be done very immediately (I'll try another iteration later).The text was updated successfully, but these errors were encountered: