这是indexloc提供的服务,不要输入任何密码
Skip to content

ServiceWorker client creation URL + No-Vary-Search #396

@hiroshige-g

Description

@hiroshige-g

Minor (Pri-4) follow-up of #387:

For the simple case of #388 (comment)

  • Prefetch /page?param=1

    • Server responds with No-Vary-Search: "param"
  • Navigate to /page?param=2

Desired result:

  • Service worker for /page?param=1 observes the prefetch
  • Prefetch bytes from /page?param=1 response are served
  • Created Document's URL is /page?param=2
  • Controlling service worker is /page?param=1 SW

For prefetch, ServiceWorker client creation URL is /page?param=2 because https://wicg.github.io/nav-speculation/prefetch.html#create-navigation-params-from-a-prefetch-record creates the ServiceWorker client based on the navigation URL.

For prerender, IIUC ServiceWorker client creation URL is /page?param=1, because https://wicg.github.io/nav-speculation/prerendering.html#prerendering-traversable-update-the-successor-for-activation Step 2 updates Document URL but doesn't update ServiceWorker client creation URL.

I don't expect this affect real use cases and thus Pri-4, no need to fix at least for mid term?
Anyway filing this issue to track (I'm sure I'll forget).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions