diff --git a/index.bs b/index.bs
index 112b19cd..8017e11f 100644
--- a/index.bs
+++ b/index.bs
@@ -1435,10 +1435,27 @@ To cleanup the session given |session|:
1. [=Close the WebSocket connections=] with |session|.
+1. If [=active sessions=] is [=list/empty=], [=cleanup remote end state=].
+
1. Perform any implementation-specific cleanup steps.
+
To
update the event map, given
|session|, |requested event names|, |browsing contexts|, and |enabled|:
@@ -2333,6 +2350,9 @@ BrowsingContextEvent = (
A [=remote end=] has a
device pixel ratio overrides which is a weak map
between [=navigables=] and device pixel ratio overrides. It is initially empty.
+Note: this map is not cleared when the final session ends i.e. device pixel
+ratio overrides outlive any WebDriver session.
+
### Types ### {#module-browsingcontext-types}
#### The browsingContext.BrowsingContext Type #### {#type-browsingContext-Browsingcontext}
@@ -4230,6 +4250,10 @@ the
WebDriver BiDi navigable created steps given
1. Let |context| be |navigable|'s [=active browsing context=].
+1. If the [=context cache behavior=] with |context| is "
bypass
",
+ then perform implementation-defined steps to disable any implementation-specific
+ resource caches for network requests originating from |context|.
+
1. Set |context|'s [=original opener=] to |opener navigable|'s [=active browsing context=],
if |opener navigable| is provided.
@@ -4698,7 +4722,8 @@ NetworkCommand = (
network.ContinueWithAuth //
network.FailRequest //
network.ProvideResponse //
- network.RemoveIntercept
+ network.RemoveIntercept //
+ network.SetCacheBehavior
)
@@ -4725,6 +4750,13 @@ A [=remote end=] has a
before request sent map which is initially an
empty map. It's used to track the network events for which a
network.beforeRequestSent
event has already been sent.
+A [=remote end=] has a
default cache behavior which is a string. It is
+initially "
default
".
+
+A [=remote end=] has a
navigable cache behavior map which is a weak
+map between [=/top-level traversables=] and strings representing cache
+behavior. It is initially empty.
+
### Network Intercepts ### {#network-intercepts}
A
network intercept is a mechanism to allow remote ends to intercept
@@ -4981,7 +5013,6 @@ request in addition to the context.
To process a network event given |session|, |event|, and |request|:
-
1. Let |request data| be the result of [=get the request data=] with |request|.
@@ -6563,6 +6594,134 @@ requests will be affected.
+#### The network.setCacheBehavior Command #### {#command-network-setCacheBehavior}
+
+The
network.setCacheBehavior command configures
+the network cache behavior for certain requests.
+
+
+ - Command Type
+ -
+
+ network.SetCacheBehavior = (
+ method: "network.setCacheBehavior",
+ params: network.SetCacheBehaviorParameters
+ )
+
+ network.SetCacheBehaviorParameters = {
+ cacheBehavior: "default" / "bypass",
+ ? contexts: [+browsingContext.BrowsingContext]
+ }
+
+
+ - Return Type
+ -
+
+ EmptyResult
+
+
+
+
+
+The WebDriver BiDi cache behavior steps given |request| are:
+
+1. Let |context| be null.
+
+1. If |request|'s [=request/window=] is an [=environment settings object=]:
+
+ 1. Let |environment settings| be |request|'s [=request/window=]
+
+ 1. If there is a [=/browsing context=] whose [=active window=] is |environment
+ settings|' [=environment settings object/global object=], set |context| to
+ the [=top-level browsing context=] for that browsing context.
+
+1. If |context| is not null and [=navigable cache behavior map=] [=set/contains=]
+ |context|, return [=navigable cache behavior map=][|context|].
+
+1. Return [=default cache behavior=].
+
+
+
+
+The context cache behavior steps given |context| are:
+
+1. Set |top-level context| to the [=top-level browsing context=] for |context|.
+
+1. If [=navigable cache behavior map=] [=map/contains=] |top-level context|, return
+ [=navigable cache behavior map=][|top-level context|].
+
+1. Return [=default cache behavior=].
+
+
+
+
+The [=remote end steps=] given
session and |command parameters| are:
+
+1. Let |behavior| be |command parameters|["
cacheBehavior
"].
+
+1. If |command parameters| does not [=map/contain=] "
contexts
":
+
+ 1. Set the [=default cache behavior=] to |behavior|.
+
+ 1. [=map/Clear=] [=navigable cache behavior map=].
+
+ 1. Switch on the value of behavior:
+
+ - "
bypass
"
+ - Perform implementation-defined steps to disable any
+ implementation-specific resource caches.
+
- "
default
"
+ - Perform implementation-defined steps to enable any
+ implementation-specific resource caches that are usually enabled in the
+ current [=remote end=] configuration.
+
+
+ 1. Return [=success=] with data null.
+
+1. Let |contexts| be an empty [=/set=].
+
+1. For each |context id| of |command parameters|["
contexts
"]:
+
+ 1. Let |context| be the result of [=trying=] to [=get a browsing context=]
+ with |context id|.
+
+ 1. If |context| is not a [=top-level browsing context=], return [=error=]
+ with [=error code=] [=invalid argument=].
+
+ 1. [=list/Append=] |context| to |contexts|.
+
+1. For each |context| in |contexts|:
+
+ 1. If [=navigable cache behavior map=] [=map/contains=] |context|, and
+ [=navigable cache behavior map=][|context|] is equal to |behavior| then
+ continue.
+
+ 1. Switch on the value of behavior:
+
+ - "
bypass
"
+ - Perform implementation-defined steps to disable any implementation-specific
+ resource caches for network requests originating from any browsing
+ context for which |context| is the [=top-level browsing context=].
+
- "
default
"
+ - Perform implementation-defined steps to enable any
+ implementation-specific resource caches that are usually enabled in the
+ current [=remote end=] configuration for network requests
+ originating from any browsing context for which |context| is the
+ [=top-level browsing context=].
+
+
+ 1. If |behavior| is equal to [=default cache behavior=]:
+
+ 1. If [=navigable cache behavior map=] [=map/contains=] |context|,
+ [=map/remove=] [=navigable cache behavior map=][|context|].
+
+ 1. Otherwise:
+
+ 1. Set [=navigable cache behavior map=][|context|] to |behavior|.
+
+1. Return [=success=] with data null.
+
+
### Events ### {#module-network-event}