@@ -4690,7 +4690,7 @@ NetworkCommand = (
4690
4690
network.FailRequest //
4691
4691
network.ProvideResponse //
4692
4692
network.RemoveIntercept //
4693
- network.SetCacheMode //
4693
+ network.SetCacheBypass //
4694
4694
)
4695
4695
4696
4696
</pre>
@@ -4717,12 +4717,12 @@ A [=remote end=] has a <dfn>before request sent map</dfn> which is initially an
4717
4717
empty map. It's used to track the network events for which a
4718
4718
<code> network.beforeRequestSent</code> event has already been sent.
4719
4719
4720
- A [=remote end=] has a <dfn>default cache mode override </dfn> which is null or a
4721
- string. It is initially null .
4720
+ A [=remote end=] has a <dfn>default cache bypass </dfn> which is a boolean. It is
4721
+ initially false .
4722
4722
4723
- A [=remote end=] has a <dfn>cache mode override map </dfn> which is initially an
4724
- empty weak map . It's used to track the cache mode to use for requests from
4725
- specific browsing contexts .
4723
+ A [=remote end=] has a <dfn>navigable cache bypass set </dfn> which is initially an
4724
+ empty weak set . It's used to track the [=/top-level traversables=] in which
4725
+ network caches are bypassed .
4726
4726
4727
4727
### Network Intercepts ### {#network-intercepts}
4728
4728
@@ -6561,22 +6561,22 @@ requests will be affected.
6561
6561
6562
6562
</div>
6563
6563
6564
- #### The network.setCacheMode Command #### {#command-network-setCacheMode }
6564
+ #### The network.setCacheBypass Command #### {#command-network-setCacheBypass }
6565
6565
6566
- The <dfn export for=commands>network.setCacheMode </dfn> command overrides
6567
- the network cache behaviour for certain requests.
6566
+ The <dfn export for=commands>network.setCacheBypass </dfn> command bypasses the
6567
+ network cache for certain requests.
6568
6568
6569
6569
<dl>
6570
6570
<dt> Command Type</dt>
6571
6571
<dd>
6572
6572
<pre class="cddl remote-cddl">
6573
- network.SetCacheMode = (
6574
- method: "network.setCacheMode ",
6575
- params: network.SetCacheModeParameters
6573
+ network.SetCacheBypass = (
6574
+ method: "network.setCacheBypass ",
6575
+ params: network.SetCacheBypassParameters
6576
6576
)
6577
6577
6578
- network.SetCacheModeParameters = {
6579
- mode: "no-store" / null ,
6578
+ network.SetCacheBypassParameters = {
6579
+ bypass: bool ,
6580
6580
? contexts: [+browsingContext.BrowsingContext]
6581
6581
}
6582
6582
</pre>
@@ -6590,8 +6590,7 @@ the network cache behaviour for certain requests.
6590
6590
</dl>
6591
6591
6592
6592
<div algorithm>
6593
- The <dfn export>WebDriver BiDi update request cache mode</dfn> steps given
6594
- |request| are:
6593
+ The <dfn export>WebDriver BiDi bypass cache</dfn> steps given |request| are:
6595
6594
6596
6595
1. Let |context| be null.
6597
6596
@@ -6601,46 +6600,54 @@ The <dfn export>WebDriver BiDi update request cache mode</dfn> steps given
6601
6600
6602
6601
1. If there is a [=/browsing context=] whose [=active window=] is |environment
6603
6602
settings|' [=environment settings object/global object=] , set |context| to
6604
- the [=top-level browsing context=] for that context.
6603
+ the [=top-level browsing context=] for that browsing context.
6605
6604
6606
- 1. If |context| is not null:
6605
+ 1. If |context| is not null and [=navigable cache bypass set=] [=set/contains=]
6606
+ |context|, return true.
6607
6607
6608
- 1. If [=cache mode override map=] [=map/contains=] |context|, set
6609
- |request|'s [=request/cache mode=] to [=cache mode override
6610
- map=] [|context|] and return.
6611
-
6612
- 1. If [=default cache mode override=] is not null, set
6613
- |request|'s [=request/cache mode=] to [=default cache mode override=] .
6608
+ 1. Return [=default cache bypass=] .
6614
6609
6615
6610
</div>
6616
6611
6617
- <div algorithm="remote end steps for network.setCacheMode ">
6612
+ <div algorithm="remote end steps for network.setCacheBypass ">
6618
6613
The [=remote end steps=] given <var ignore> session</var> and |command parameters| are:
6619
6614
6620
- 1. Let |mode | be |command parameters|["<code>mode </code>"] .
6615
+ 1. Let |bypass | be |command parameters|["<code>bypass </code>"] .
6621
6616
6622
- 1. If |command parameters| does not [=map/contain=] "<code> contexts</code> ", set
6623
- the [=default cache mode override=] to |mode| and return [=success=] with
6624
- data null.
6617
+ 1. If |command parameters| does not [=map/contain=] "<code> contexts</code> ":
6625
6618
6626
- 1. Let |contexts| be an empty [=/list=] .
6619
+ 1. Set the [=default cache bypass=] to |bypass|.
6620
+
6621
+ 1. If |bypass| is true, perform implementation-defined steps to disable any
6622
+ implementation-specific resource caches for network requests. Otherwise
6623
+ re-enable any implementation-specific resource caches for all contexts.
6624
+
6625
+ 1. Return [=success=] with data null.
6626
+
6627
+ 1. Let |contexts| be an empty [=/set=] .
6627
6628
6628
6629
1. For each |context id| of |command parameters|["<code>contexts</code>"] :
6629
6630
6630
- 1. Let |context| be the result of [=trying=] to [=get a browsing context=]
6631
- with |context id|.
6631
+ 1. Let |context| be the result of [=trying=] to [=get a browsing context=]
6632
+ with |context id|.
6632
6633
6633
- 1. If |context| is not a [=top-level browsing context=] , return [=error=]
6634
- with [=error code=] [=invalid argument=] .
6634
+ 1. If |context| is not a [=top-level browsing context=] , return [=error=]
6635
+ with [=error code=] [=invalid argument=] .
6635
6636
6636
- 1. [=list/Append=] |context| to |contexts|.
6637
+ 1. [=list/Append=] |context| to |contexts|.
6637
6638
6638
6639
1. For each |context| in |contexts|:
6639
6640
6640
- 1. If |mode| is null and [=cache mode override map=] [=map/contains=]
6641
- |context| [=map/remove=] |context| from [=cache mode override map=] .
6641
+ 1. If |bypass| is true:
6642
+
6643
+ 1. [=set/append=] |context| to [=navigable cache bypass set=] .
6644
+
6645
+ 1. Perform implementation-defined steps to disable any implementation-specific
6646
+ resource caches for network requests originating from |context|.
6647
+
6648
+ 1. Otherwise, if [=navigable cache bypass set=] [=set/contains=]
6649
+ |context|, [=set/remove=] |context| from [=navigable cache bypass set=] .
6642
6650
6643
- 1. Otherwise, set [=cache mode override map=] [|context|] to |mode|.
6644
6651
6645
6652
1. Return [=success=] with data null.
6646
6653
0 commit comments