WICG / nav-speculation

Proposal to enable privacy-enhanced preloading
https://wicg.github.io/nav-speculation/
Other
146 stars 33 forks source link

Prefetch not working if there is a Service Worker registered #317

Open robertgr991 opened 1 month ago

robertgr991 commented 1 month ago

While trying to implement Speculative loads, I encountered the failure "The URL was not eligible to be prefetched because there was a registered service worker for that origin, which is currently not supported.". The prefetch urls are only "same-site". The Service Worker is used to cache fonts, JS and CSS resources. If the worker is disabled, speculations works as expected.

I've tried to find information on this error but couldn't find anything. <link rel="prefetch"> doesn't cause this issue.

Does anyone have any input on this?

Screenshot 2024-05-15 113847

jeremyroman commented 1 month ago

Yes, this is currently a shortcoming of the Chromium implementation and I believe also the spec, one which we should fix.

@hiroshige-g I believe this corresponds to this Chromium bug and this document. Is anything else required to track this?