Skip to content

Commit 2cf8466

Browse files
Handle Fetch: Use correct storage key for subresource requests (#1790)
SHA: 3ab2b8a Reason: push, by yoshisatoyanagisawa Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent f6ad7cc commit 2cf8466

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

docs/index.html

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<link href="https://www.w3.org/StyleSheets/TR/2021/W3C-ED" rel="stylesheet">
88
<meta content="Bikeshed version 3f621ba99, updated Mon Jul 28 15:38:36 2025 -0700" name="generator">
99
<link href="https://www.w3.org/TR/service-workers/" rel="canonical">
10-
<meta content="953b6d33ba2b693f932a9476b89fd1f1412056b6" name="revision">
10+
<meta content="3ab2b8accba713c6f7ba69126beb9d45245bbca9" name="revision">
1111
<meta content="dark light" name="color-scheme">
1212
<link href="https://www.w3.org/StyleSheets/TR/2021/dark.css" media="(prefers-color-scheme: dark)" rel="stylesheet" type="text/css">
1313
<style>/* Boilerplate: style-autolinks */
@@ -966,7 +966,7 @@
966966
</p>
967967
<h1 class="p-name no-ref" id="title">Service Workers Nightly</h1>
968968
<p id="w3c-state"><a href="https://www.w3.org/standards/types/#ED">Editor’s Draft</a>,
969-
<time class="dt-updated" datetime="2025-09-04">4 September 2025</time></p>
969+
<time class="dt-updated" datetime="2025-09-09">9 September 2025</time></p>
970970
<details open>
971971
<summary>More details about this document</summary>
972972
<div data-fill-with="spec-metadata">
@@ -5356,7 +5356,21 @@ <h3 class="heading settled" id="on-fetch-request-algorithm"><span class="content
53565356
<li data-md>
53575357
<p>Set <var>timingInfo</var>’s <a data-link-type="dfn" href="#service-worker-timing-info-worker-cache-lookup-start" id="ref-for-service-worker-timing-info-worker-cache-lookup-start">worker cache lookup start</a> to the <a data-link-type="dfn" href="https://w3c.github.io/hr-time/#dfn-coarsened-shared-current-time" id="ref-for-dfn-coarsened-shared-current-time①">coarsened shared current time</a> given <var>useHighResPerformanceTimers</var>.</p>
53585358
<li data-md>
5359-
<p>Let <var>caches</var> be the result of running <a data-link-type="dfn" href="https://storage.spec.whatwg.org/#obtain-a-local-storage-bottle-map" id="ref-for-obtain-a-local-storage-bottle-map">obtain a local storage bottle map</a> with <var>reservedClient</var> and "<code>caches</code>".</p>
5359+
<p>Let <var>environment</var> be null.</p>
5360+
<li data-md>
5361+
<p>If <var>request</var> is a <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#non-subresource-request" id="ref-for-non-subresource-request②">non-subresource request</a>, then:</p>
5362+
<ol>
5363+
<li data-md>
5364+
<p>Set <var>environment</var> to <var>reservedClient</var>.</p>
5365+
</ol>
5366+
<li data-md>
5367+
<p>Else:</p>
5368+
<ol>
5369+
<li data-md>
5370+
<p>Set <var>environment</var> to <var>client</var>.</p>
5371+
</ol>
5372+
<li data-md>
5373+
<p>Let <var>caches</var> be the result of running <a data-link-type="dfn" href="https://storage.spec.whatwg.org/#obtain-a-local-storage-bottle-map" id="ref-for-obtain-a-local-storage-bottle-map">obtain a local storage bottle map</a> with <var>environment</var> and "<code>caches</code>".</p>
53605374
<li data-md>
53615375
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#map-iterate" id="ref-for-map-iterate⑥">For each</a> <var>cacheName</var> → <var>cache</var> of <var>caches</var>.</p>
53625376
<ol>
@@ -5635,7 +5649,7 @@ <h3 class="heading settled" id="create-fetch-event-and-dispatch-algorithm"><span
56355649
<p>Let <var>shouldSoftUpdate</var> be true if any of the following are true, and false otherwise:</p>
56365650
<ul>
56375651
<li data-md>
5638-
<p><var>request</var> is a <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#non-subresource-request" id="ref-for-non-subresource-request">non-subresource request</a>.</p>
5652+
<p><var>request</var> is a <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#non-subresource-request" id="ref-for-non-subresource-request">non-subresource request</a>.</p>
56395653
<li data-md>
56405654
<p><var>request</var> is a <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#subresource-request" id="ref-for-subresource-request②">subresource request</a> and <var>registration</var> is <a data-link-type="dfn" href="#service-worker-registration-stale" id="ref-for-service-worker-registration-stale④">stale</a>.</p>
56415655
</ul>
@@ -5700,7 +5714,7 @@ <h3 class="heading settled" id="create-fetch-event-and-dispatch-algorithm"><span
57005714
<li data-md>
57015715
<p>Initialize <var>e</var>’s <code class="idl"><a data-link-type="idl" href="#dom-fetchevent-clientid" id="ref-for-dom-fetchevent-clientid②">clientId</a></code> attribute to <var>client</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-environment-id" id="ref-for-concept-environment-id③">id</a>.</p>
57025716
<li data-md>
5703-
<p>If <var>request</var> is a <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#non-subresource-request" id="ref-for-non-subresource-request">non-subresource request</a> and <var>request</var>’s <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-request-destination" id="ref-for-concept-request-destination⑤">destination</a> is not <code class="idl"><a data-link-type="idl" href="https://fetch.spec.whatwg.org/#dom-requestdestination-report" id="ref-for-dom-requestdestination-report①">"report"</a></code>, initialize <var>e</var>’s <code class="idl"><a data-link-type="idl" href="#dom-fetchevent-resultingclientid" id="ref-for-dom-fetchevent-resultingclientid②">resultingClientId</a></code> attribute to <var>reservedClient</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-environment-id" id="ref-for-concept-environment-id④">id</a>, and to the empty string otherwise.</p>
5717+
<p>If <var>request</var> is a <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#non-subresource-request" id="ref-for-non-subresource-request">non-subresource request</a> and <var>request</var>’s <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-request-destination" id="ref-for-concept-request-destination⑤">destination</a> is not <code class="idl"><a data-link-type="idl" href="https://fetch.spec.whatwg.org/#dom-requestdestination-report" id="ref-for-dom-requestdestination-report①">"report"</a></code>, initialize <var>e</var>’s <code class="idl"><a data-link-type="idl" href="#dom-fetchevent-resultingclientid" id="ref-for-dom-fetchevent-resultingclientid②">resultingClientId</a></code> attribute to <var>reservedClient</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-environment-id" id="ref-for-concept-environment-id④">id</a>, and to the empty string otherwise.</p>
57045718
<li data-md>
57055719
<p>If <var>request</var> is a <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#navigation-request" id="ref-for-navigation-request②">navigation request</a>, initialize <var>e</var>’s <code class="idl"><a data-link-type="idl" href="#dom-fetchevent-replacesclientid" id="ref-for-dom-fetchevent-replacesclientid②">replacesClientId</a></code> attribute to <var>request</var>’s <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-request-replaces-client-id" id="ref-for-concept-request-replaces-client-id">replaces client id</a>, and to the empty string otherwise.</p>
57065720
<li data-md>
@@ -7048,7 +7062,7 @@ <h3 class="heading settled" id="lookup-race-response-algorithm"><span class="con
70487062
<li data-md>
70497063
<p>Let <var>registration</var> be null.</p>
70507064
<li data-md>
7051-
<p>If <var>request</var> is a <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#non-subresource-request" id="ref-for-non-subresource-request">non-subresource request</a>, then:</p>
7065+
<p>If <var>request</var> is a <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#non-subresource-request" id="ref-for-non-subresource-request">non-subresource request</a>, then:</p>
70527066
<ol>
70537067
<li data-md>
70547068
<p>If <var>request</var>’s <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-request-reserved-client" id="ref-for-concept-request-reserved-client②">reserved client</a> is null, return null.</p>
@@ -10409,7 +10423,7 @@ <h2 class="no-num no-ref heading settled" id="issues-index"><span class="content
1040910423
"5991ccfb": {"dfnID":"5991ccfb","dfnText":"relevant realm","external":true,"refSections":[{"refs":[{"id":"ref-for-concept-relevant-realm"}],"title":"3.4.5. getRegistrations()"},{"refs":[{"id":"ref-for-concept-relevant-realm\u2460"}],"title":"4.2.6. postMessage(message, options)"},{"refs":[{"id":"ref-for-concept-relevant-realm\u2461"}],"title":"4.3.2. matchAll(options)"},{"refs":[{"id":"ref-for-concept-relevant-realm\u2462"}],"title":"4.6.7. event.respondWith(r)"},{"refs":[{"id":"ref-for-concept-relevant-realm\u2463"}],"title":"5.4.2. matchAll(request, options)"},{"refs":[{"id":"ref-for-concept-relevant-realm\u2464"}],"title":"5.4.4. addAll(requests)"},{"refs":[{"id":"ref-for-concept-relevant-realm\u2465"}],"title":"5.4.5. put(request, response)"},{"refs":[{"id":"ref-for-concept-relevant-realm\u2466"}],"title":"5.4.6. delete(request, options)"},{"refs":[{"id":"ref-for-concept-relevant-realm\u2467"}],"title":"5.4.7. keys(request, options)"},{"refs":[{"id":"ref-for-concept-relevant-realm\u2468"},{"id":"ref-for-concept-relevant-realm\u2460\u24ea"}],"title":"Create Fetch Event and Dispatch"},{"refs":[{"id":"ref-for-concept-relevant-realm\u2460\u2460"}],"title":"Fire Functional Event"}],"url":"https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm"},
1041010424
"59ed4e57": {"dfnID":"59ed4e57","dfnText":"ReadableStream","external":true,"refSections":[{"refs":[{"id":"ref-for-readablestream"}],"title":"4.6.7. event.respondWith(r)"}],"url":"https://streams.spec.whatwg.org/#readablestream"},
1041110425
"59f47681": {"dfnID":"59f47681","dfnText":"blob URL","external":true,"refSections":[{"refs":[{"id":"ref-for-blob-url"}],"title":"2.5.2. The worker client case"},{"refs":[{"id":"ref-for-blob-url\u2460"}],"title":"2.5. Control and Use"}],"url":"https://w3c.github.io/FileAPI/#blob-url"},
10412-
"5a391458": {"dfnID":"5a391458","dfnText":"non-subresource request","external":true,"refSections":[{"refs":[{"id":"ref-for-non-subresource-request"},{"id":"ref-for-non-subresource-request\u2460"}],"title":"Handle Fetch"},{"refs":[{"id":"ref-for-non-subresource-request\u2461"},{"id":"ref-for-non-subresource-request\u2462"}],"title":"Create Fetch Event and Dispatch"},{"refs":[{"id":"ref-for-non-subresource-request\u2463"}],"title":"Lookup Race Response"}],"url":"https://fetch.spec.whatwg.org/#non-subresource-request"},
10426+
"5a391458": {"dfnID":"5a391458","dfnText":"non-subresource request","external":true,"refSections":[{"refs":[{"id":"ref-for-non-subresource-request"},{"id":"ref-for-non-subresource-request\u2460"},{"id":"ref-for-non-subresource-request\u2461"}],"title":"Handle Fetch"},{"refs":[{"id":"ref-for-non-subresource-request\u2462"},{"id":"ref-for-non-subresource-request\u2463"}],"title":"Create Fetch Event and Dispatch"},{"refs":[{"id":"ref-for-non-subresource-request\u2464"}],"title":"Lookup Race Response"}],"url":"https://fetch.spec.whatwg.org/#non-subresource-request"},
1041310427
"5afbefcd": {"dfnID":"5afbefcd","dfnText":"item (for list)","external":true,"refSections":[{"refs":[{"id":"ref-for-list-item"},{"id":"ref-for-list-item\u2460"},{"id":"ref-for-list-item\u2461"}],"title":"2.1. Service Worker"},{"refs":[{"id":"ref-for-list-item\u2462"},{"id":"ref-for-list-item\u2463"}],"title":"2.5.2. The worker client case"},{"refs":[{"id":"ref-for-list-item\u2464"}],"title":"5.4.5. put(request, response)"},{"refs":[{"id":"ref-for-list-item\u2465"}],"title":"5.5.5. keys()"},{"refs":[{"id":"ref-for-list-item\u2466"}],"title":"Appendix A: Algorithms"},{"refs":[{"id":"ref-for-list-item\u2467"}],"title":"Run Job"},{"refs":[{"id":"ref-for-list-item\u2468"}],"title":"Finish Job"},{"refs":[{"id":"ref-for-list-item\u2460\u24ea"}],"title":"Terminate Service Worker"},{"refs":[{"id":"ref-for-list-item\u2460\u2460"},{"id":"ref-for-list-item\u2460\u2461"},{"id":"ref-for-list-item\u2460\u2462"}],"title":"Batch Cache Operations"}],"url":"https://infra.spec.whatwg.org/#list-item"},
1041410428
"5c35dd47": {"dfnID":"5c35dd47","dfnText":"sandbox","external":true,"refSections":[{"refs":[{"id":"ref-for-attr-iframe-sandbox"}],"title":"2.5.1. The window client case"}],"url":"https://html.spec.whatwg.org/multipage/iframe-embed-object.html#attr-iframe-sandbox"},
1041510429
"5c4f772b": {"dfnID":"5c4f772b","dfnText":"match","external":true,"refSections":[{"refs":[{"id":"ref-for-url-pattern-match"}],"title":"Match Router Condition"}],"url":"https://urlpattern.spec.whatwg.org/#url-pattern-match"},

0 commit comments

Comments
 (0)