You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
:: <a>Fetch a module worker script graph</a> given |job|’s <a lt="URL serializer">serialized</a>[=job/script url=], |job|’s [=job/client=], "<code>serviceworker</code>", "<code>omit</code>", and the to-be-created <a>environment settings object</a> for this service worker.
2474
2474
2475
-
To [=fetching scripts/perform the fetch=] given |request|, run the following steps if the [=fetching scripts/is top-level=] flag is set:
2475
+
To [=fetching scripts/perform the fetch=] given |request|, run the following steps:
2476
2476
2477
-
1. Append \`<code>Service-Worker</code>\`/\`<code>script</code>\` to |request|'s [=request/header list=].
2478
-
2479
-
Note: See the definition of the Service-Worker header in Appendix B: Extended HTTP headers.
2480
-
2481
-
1. Set |request|'s <a>skip-service-worker flag</a> and |request|'s [=request/redirect mode=] to "<code>error</code>".
2482
2477
1. Set |request|'s [=request/cache mode=] to "<code>no-cache</code>" if any of the following are true:
2483
2478
* |registration|'s [=service worker registration/use cache=] is false.
2484
2479
* |job|'s [=force bypass cache flag=] is set.
2485
2480
* |newestWorker| is not null, and |registration|'s [=last update check time=] is not null and the time difference in seconds calculated by the current time minus |registration|’s [=last update check time=] is greater than 86400.
2486
2481
2487
2482
Note: Even if the cache mode is not set to "<code>no-cache</code>", the user agent obeys Cache-Control header's max-age value in the network layer to determine if it should bypass the browser cache.
2483
+
2484
+
1. Set |request|'s [=skip-service-worker flag=].
2485
+
1. If the [=fetching scripts/is top-level=] flag is unset, then return the result of [=/fetching=] |request|.
2486
+
1. Append \`<code>Service-Worker</code>\`/\`<code>script</code>\` to |request|'s [=request/header list=].
2487
+
2488
+
Note: See the definition of the Service-Worker header in Appendix B: Extended HTTP headers.
2489
+
2490
+
1. Set |request|'s [=request/redirect mode=] to "<code>error</code>".
2488
2491
2489
2492
1. [=/Fetch=] |request|, and asynchronously wait to run the remaining steps as part of fetch's <a>process response</a> for the [=/response=] |response|.
2490
2493
1. <a>Extract a MIME type</a> from the |response|'s [=response/header list=]. If this MIME type (ignoring parameters) is not one of <code>text/javascript</code>, <code>application/x-javascript</code>, and <code>application/javascript</code>, then:
0 commit comments