diff --git a/fetch.bs b/fetch.bs
index 9288778b0..188ddd74e 100644
--- a/fetch.bs
+++ b/fetch.bs
@@ -745,26 +745,18 @@ explicitly set request's
navigator.sendBeacon
and the HTML img
element set this flag. Requests with
this flag set are subject to additional processing requirements.
-
A request has an associated
-service-workers mode, that is "all
",
-"foreign
", or "none
". Unless stated otherwise it is
-"all
".
+
A request has an associated service-workers mode, that
+is "all
" or "none
". Unless stated otherwise it is "all
".
This determines which service workers will receive a {{fetch!!event}} event for this fetch.
all
"
- foreign
"
- none
"
- Let actualResponse be null.
If request's service-workers mode is not "none
", then run these
- substeps:
+
If request's service-workers mode is "all
", then:
If request's service-workers mode is "all
", then set
- response to the result of invoking handle fetch for request.
- [[!HTML]] [[!SW]]
-
-
If response is null, request is a subresource request, and - request's origin is not - same origin with request's - url's - origin, then set response - to the result of invoking handle foreign fetch for - request. [[!SW]] +
Set response to the result of invoking handle fetch for + request. [[!HTML]] [[!SW]]
If response is not null, then run these substeps: @@ -2983,9 +2963,8 @@ optional CORS flag and CORS-preflight flag, run these steps: CORS-preflight fetches.
If request's redirect mode is
- "follow
", then set request's service-workers mode to
- "foreign
".
+
If request's redirect mode is "follow
", then set
+ request's service-workers mode to "none
".
Redirects coming from the network (as opposed to from a service worker) are not to be exposed to a service worker. @@ -5377,7 +5356,7 @@ method, must run these steps:
foreign
".
+ then set request's service-workers mode to "none
".
Let responseObject be a new {{Response}} object and a new associated {{Headers}} object whose guard is