v159 · service worker · inspection tool
Fetch-shape inspector
Chrome only deduplicates a handler’s request onto the raced network request when it carries that request’s race token, and only reports the distinct message while the token’s loader is still the race loader. This table runs each common way of “fetching the request” inside a fetch handler, under the same cancellation (server headers after 800 ms, fallback timer at 120 ms), and prints exactly what every fetch() promise did.
Registering this feature’s service worker…
Inspect the call shapes
| Shape | Run | What the worker’s fetch() promise(s) did | Page got |
|---|
No shape run yet.
reading the table
fetch(event.request)— deduplicated onto the raced request. Cancelled with it, and carries the distinct message on Chrome 159+.fetch(new Request(event.request))— the copy keeps the race token (observed in Chrome 159/160), so it is deduplicated and cancelled the same way.fetch(event.request.url)— a brand-new request with no token: it is not cancelled with the race and fulfils on its own, at the cost of a second network request.- Two
fetch(event.request)calls — only the first gets the race loader; the second falls back to a normal loader and fulfils. Chromium looks the loader state up per token when the first one fails, finds “already consumed”, and reports the first cancellation as the generic"Failed to fetch"even on Chrome 160 (GetCustomFetchErrorMessagerequires statekRaceLoaderUsed). - Control —
respondWith(fetch(event.request))with no timer: nothing cancels the race, so it fulfils.