[w3c/ServiceWorker] Set request's initiator and destination to empty string in cache.addA… (PR #1822)

As pointed out in https://github.com/w3c/ServiceWorker/issues/1718, "fetch" is not a valid value for a request's initiator, and "subresource" is not a valid destination in the Fetch specification.

Following the discussion in the issue, `cache.addAll()` should function the same as if a script ran `fetch()` directly. Therefore, both initiator and destination should be set to the empty string.

Fixes #1718


<!--
    This comment and the below content is programmatically generated.
    You may add a comma-separated list of anchors you'd like a
    direct link to below (e.g. #idl-serializers, #idl-sequence):

    Don't remove this comment or modify anything below this line.
    If you don't want a preview generated for this pull request,
    just replace the whole of this comment's content by "no preview"
    and remove what's below.
-->
***
<a href="https://pr-preview.s3.amazonaws.com/yoshisatoyanagisawa/ServiceWorker/pull/1822.html" title="Last updated on Apr 8, 2026, 3:28 AM UTC (5f15318)">Preview</a> | <a href="https://pr-preview.s3.amazonaws.com/w3c/ServiceWorker/1822/c9b4790...yoshisatoyanagisawa:5f15318.html" title="Last updated on Apr 8, 2026, 3:28 AM UTC (5f15318)">Diff</a>
You can view, comment on, or merge this pull request online at:

  https://github.com/w3c/ServiceWorker/pull/1822

-- Commit Summary --

  * Set request's initiator and destination to empty string in cache.addAll() (#1718)

-- File Changes --

    M index.bs (2)

-- Patch Links --

https://github.com/w3c/ServiceWorker/pull/1822.patchhttps://github.com/w3c/ServiceWorker/pull/1822.diff
-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/pull/1822
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/ServiceWorker/pull/1822@github.com>

Received on Wednesday, 8 April 2026 03:29:05 UTC