@@ -1446,9 +1446,9 @@ To <dfn>cleanup remote end state</dfn>.
1446
1446
1447
1447
1. [=map/Clear=] the [=before request sent map=] .
1448
1448
1449
- 1. Set the [=default cache bypass =] to false .
1449
+ 1. Set the [=default cache behavior =] to " <code> default </code> " .
1450
1450
1451
- 1. [=set/Empty =] the [=navigable cache bypass set =] .
1451
+ 1. [=map/Clear =] the [=navigable cache behavior map =] .
1452
1452
1453
1453
</div>
1454
1454
@@ -4733,12 +4733,12 @@ A [=remote end=] has a <dfn>before request sent map</dfn> which is initially an
4733
4733
empty map. It's used to track the network events for which a
4734
4734
<code> network.beforeRequestSent</code> event has already been sent.
4735
4735
4736
- A [=remote end=] has a <dfn>default cache bypass </dfn> which is a boolean . It is
4737
- initially false .
4736
+ A [=remote end=] has a <dfn>default cache behavior </dfn> which is a string . It is
4737
+ initially " <code> default </code> " .
4738
4738
4739
- A [=remote end=] has a <dfn>navigable cache bypass set </dfn> which is initially an
4740
- empty weak set. It's used to track the [=/top-level traversables=] in which
4741
- network caches are bypassed .
4739
+ A [=remote end=] has a <dfn>navigable cache behavior map </dfn> which is a weak
4740
+ map between [=/top-level traversables=] and strings representing cache
4741
+ behavior. It is initially empty .
4742
4742
4743
4743
### Network Intercepts ### {#network-intercepts}
4744
4744
@@ -6577,22 +6577,22 @@ requests will be affected.
6577
6577
6578
6578
</div>
6579
6579
6580
- #### The network.setCacheBypass Command #### {#command-network-setCacheBypass }
6580
+ #### The network.setCacheBehavior Command #### {#command-network-setCacheBehavior }
6581
6581
6582
- The <dfn export for=commands>network.setCacheBypass </dfn> command bypasses the
6583
- network cache for certain requests.
6582
+ The <dfn export for=commands>network.setCacheBehavior </dfn> command configures
6583
+ the network cache behavior for certain requests.
6584
6584
6585
6585
<dl>
6586
6586
<dt> Command Type</dt>
6587
6587
<dd>
6588
6588
<pre class="cddl remote-cddl">
6589
- network.SetCacheBypass = (
6590
- method: "network.setCacheBypass ",
6591
- params: network.SetCacheBypassParameters
6589
+ network.SetCacheBehavior = (
6590
+ method: "network.setCacheBehavior ",
6591
+ params: network.SetCacheBehaviorParameters
6592
6592
)
6593
6593
6594
- network.SetCacheBypassParameters = {
6595
- bypass: bool ,
6594
+ network.SetCacheBehaviorParameters = {
6595
+ cacheBehavior: "default" / "bypass" ,
6596
6596
? contexts: [+browsingContext.BrowsingContext]
6597
6597
}
6598
6598
</pre>
@@ -6606,7 +6606,7 @@ network cache for certain requests.
6606
6606
</dl>
6607
6607
6608
6608
<div algorithm>
6609
- The <dfn export>WebDriver BiDi bypass cache</dfn> steps given |request| are:
6609
+ The <dfn export>WebDriver BiDi cache behavior </dfn> steps given |request| are:
6610
6610
6611
6611
1. Let |context| be null.
6612
6612
@@ -6618,53 +6618,78 @@ The <dfn export>WebDriver BiDi bypass cache</dfn> steps given |request| are:
6618
6618
settings|' [=environment settings object/global object=] , set |context| to
6619
6619
the [=top-level browsing context=] for that browsing context.
6620
6620
6621
- 1. If |context| is not null and [=navigable cache bypass set =] [=set/contains=]
6622
- |context|, return true .
6621
+ 1. If |context| is not null and [=navigable cache behavior map =] [=set/contains=]
6622
+ |context|, return [=navigable cache behavior map=] [|context|] .
6623
6623
6624
- 1. Return [=default cache bypass =] .
6624
+ 1. Return [=default cache behavior =] .
6625
6625
6626
6626
</div>
6627
6627
6628
- <div algorithm="remote end steps for network.setCacheBypass ">
6628
+ <div algorithm="remote end steps for network.setCacheBehavior ">
6629
6629
The [=remote end steps=] given <var ignore> session</var> and |command parameters| are:
6630
6630
6631
- 1. Let |bypass | be |command parameters|["<code>bypass </code>"] .
6631
+ 1. Let |behavior | be |command parameters|["<code>cacheBehavior </code>"] .
6632
6632
6633
6633
1. If |command parameters| does not [=map/contain=] "<code> contexts</code> ":
6634
6634
6635
- 1. Set the [=default cache bypass =] to |bypass |.
6635
+ 1. Set the [=default cache behavior =] to |behavior |.
6636
6636
6637
- 1. If |bypass| is true, perform implementation-defined steps to disable any
6638
- implementation-specific resource caches for network requests. Otherwise
6639
- re-enable any implementation-specific resource caches for all contexts.
6637
+ 1. [=map/Clear=] [=navigable cache behavior map=] .
6640
6638
6641
- 1. Return [=success=] with data null.
6639
+ 1. Switch on the value of behavior:
6640
+ <dl>
6641
+ <dt> "<code> bypass</code> "
6642
+ <dd> Perform implementation-defined steps to disable any
6643
+ implementation-specific resource caches for all future
6644
+ network requests.
6645
+ <dt> "<code> default</code> "
6646
+ <dd> Perform implementation-defined steps to enable any
6647
+ implementation-specific resource caches that are usually enabled in the
6648
+ current [=remote end=] configuration for all future network requests.
6649
+ </dl>
6650
+
6651
+ 1. Return [=success=] with data null.
6642
6652
6643
6653
1. Let |contexts| be an empty [=/set=] .
6644
6654
6645
6655
1. For each |context id| of |command parameters|["<code>contexts</code>"] :
6646
6656
6647
- 1. Let |context| be the result of [=trying=] to [=get a browsing context=]
6657
+ 1. Let |context| be the result of [=trying=] to [=get a browsing context=]
6648
6658
with |context id|.
6649
6659
6650
- 1. If |context| is not a [=top-level browsing context=] , return [=error=]
6651
- with [=error code=] [=invalid argument=] .
6660
+ 1. If |context| is not a [=top-level browsing context=] , return [=error=]
6661
+ with [=error code=] [=invalid argument=] .
6652
6662
6653
- 1. [=list/Append=] |context| to |contexts|.
6663
+ 1. [=list/Append=] |context| to |contexts|.
6654
6664
6655
6665
1. For each |context| in |contexts|:
6656
6666
6657
- 1. If |bypass| is true:
6667
+ 1. If [=navigable cache behavior map=] [=map/contains=] |context|, and
6668
+ [=navigable cache behavior map=] [|context|] is equal to |behavior| then
6669
+ continue.
6670
+
6671
+ 1. Switch on the value of behavior:
6672
+ <dl>
6673
+ <dt> "<code> bypass</code> "
6674
+ <dd> Perform implementation-defined steps to disable any implementation-specific
6675
+ resource caches for network requests originating from any browsing
6676
+ context for which |context| is the [=top-level browsing context=] .
6677
+ <dt> "<code> default</code> "
6678
+ <dd> Perform implementation-defined steps to enable any
6679
+ implementation-specific resource caches that are usually enabled in the
6680
+ current [=remote end=] configuration for network requests
6681
+ originating from any browsing context for which |context| is the
6682
+ [=top-level browsing context=] .
6683
+ </dl>
6684
+
6685
+ 1. If |behavior| is equal to [=default cache behavior=] :
6658
6686
6659
- 1. [=set/append=] |context| to [=navigable cache bypass set=] .
6687
+ 1. If [=navigable cache behavior map=] [=map/contains=] |context|,
6688
+ [=map/remove=] [=navigable cache behavior map=] [|context|] .
6660
6689
6661
- 1. Perform implementation-defined steps to disable any implementation-specific
6662
- resource caches for network requests originating from |context|.
6690
+ 1. Otherwise:
6663
6691
6664
- 1. Otherwise, if [=navigable cache bypass set=] [=set/contains=]
6665
- |context|, [=set/remove=] |context| from [=navigable cache bypass set=] and
6666
- re-enable any implementation-specific resource caches for network requests
6667
- originating from |context|.
6692
+ 1. Set [=navigable cache behavior map=] [|context|] to |behavior|.
6668
6693
6669
6694
1. Return [=success=] with data null.
6670
6695
0 commit comments