@@ -4598,7 +4598,7 @@ NetworkCommand = (
4598
4598
network.FailRequest //
4599
4599
network.ProvideResponse //
4600
4600
network.RemoveIntercept //
4601
- network.SetCacheMode //
4601
+ network.SetCacheBypass //
4602
4602
)
4603
4603
4604
4604
</pre>
@@ -4625,12 +4625,12 @@ A [=remote end=] has a <dfn>before request sent map</dfn> which is initially an
4625
4625
empty map. It's used to track the network events for which a
4626
4626
<code> network.beforeRequestSent</code> event has already been sent.
4627
4627
4628
- A [=remote end=] has a <dfn>default cache mode override </dfn> which is null or a
4629
- string. It is initially null .
4628
+ A [=remote end=] has a <dfn>default cache bypass </dfn> which is a boolean. It is
4629
+ initially false .
4630
4630
4631
- A [=remote end=] has a <dfn>cache mode override map </dfn> which is initially an
4632
- empty weak map . It's used to track the cache mode to use for requests from
4633
- specific browsing contexts .
4631
+ A [=remote end=] has a <dfn>navigable cache bypass set </dfn> which is initially an
4632
+ empty weak set . It's used to track the [=/top-level traversables=] in which
4633
+ network caches are bypassed .
4634
4634
4635
4635
### Network Intercepts ### {#network-intercepts}
4636
4636
@@ -6445,22 +6445,22 @@ requests will be affected.
6445
6445
6446
6446
</div>
6447
6447
6448
- #### The network.setCacheMode Command #### {#command-network-setCacheMode }
6448
+ #### The network.setCacheBypass Command #### {#command-network-setCacheBypass }
6449
6449
6450
- The <dfn export for=commands>network.setCacheMode </dfn> command overrides
6451
- the network cache behaviour for certain requests.
6450
+ The <dfn export for=commands>network.setCacheBypass </dfn> command bypasses the
6451
+ network cache for certain requests.
6452
6452
6453
6453
<dl>
6454
6454
<dt> Command Type</dt>
6455
6455
<dd>
6456
6456
<pre class="cddl remote-cddl">
6457
- network.SetCacheMode = (
6458
- method: "network.setCacheMode ",
6459
- params: network.SetCacheModeParameters
6457
+ network.SetCacheBypass = (
6458
+ method: "network.setCacheBypass ",
6459
+ params: network.SetCacheBypassParameters
6460
6460
)
6461
6461
6462
- network.SetCacheModeParameters = {
6463
- mode: "no-store" / null ,
6462
+ network.SetCacheBypassParameters = {
6463
+ bypass: bool ,
6464
6464
? contexts: [+browsingContext.BrowsingContext]
6465
6465
}
6466
6466
</pre>
@@ -6474,8 +6474,7 @@ the network cache behaviour for certain requests.
6474
6474
</dl>
6475
6475
6476
6476
<div algorithm>
6477
- The <dfn export>WebDriver BiDi update request cache mode</dfn> steps given
6478
- |request| are:
6477
+ The <dfn export>WebDriver BiDi bypass cache</dfn> steps given |request| are:
6479
6478
6480
6479
1. Let |context| be null.
6481
6480
@@ -6485,46 +6484,54 @@ The <dfn export>WebDriver BiDi update request cache mode</dfn> steps given
6485
6484
6486
6485
1. If there is a [=/browsing context=] whose [=active window=] is |environment
6487
6486
settings|' [=environment settings object/global object=] , set |context| to
6488
- the [=top-level browsing context=] for that context.
6487
+ the [=top-level browsing context=] for that browsing context.
6489
6488
6490
- 1. If |context| is not null:
6489
+ 1. If |context| is not null and [=navigable cache bypass set=] [=set/contains=]
6490
+ |context|, return true.
6491
6491
6492
- 1. If [=cache mode override map=] [=map/contains=] |context|, set
6493
- |request|'s [=request/cache mode=] to [=cache mode override
6494
- map=] [|context|] and return.
6495
-
6496
- 1. If [=default cache mode override=] is not null, set
6497
- |request|'s [=request/cache mode=] to [=default cache mode override=] .
6492
+ 1. Return [=default cache bypass=] .
6498
6493
6499
6494
</div>
6500
6495
6501
- <div algorithm="remote end steps for network.setCacheMode ">
6496
+ <div algorithm="remote end steps for network.setCacheBypass ">
6502
6497
The [=remote end steps=] given <var ignore> session</var> and |command parameters| are:
6503
6498
6504
- 1. Let |mode | be |command parameters|["<code>mode </code>"] .
6499
+ 1. Let |bypass | be |command parameters|["<code>bypass </code>"] .
6505
6500
6506
- 1. If |command parameters| does not [=map/contain=] "<code> contexts</code> ", set
6507
- the [=default cache mode override=] to |mode| and return [=success=] with
6508
- data null.
6501
+ 1. If |command parameters| does not [=map/contain=] "<code> contexts</code> ":
6509
6502
6510
- 1. Let |contexts| be an empty [=/list=] .
6503
+ 1. Set the [=default cache bypass=] to |bypass|.
6504
+
6505
+ 1. If |bypass| is true, perform implementation-defined steps to disable any
6506
+ implementation-specific resource caches for network requests. Otherwise
6507
+ re-enable any implementation-specific resource caches for all contexts.
6508
+
6509
+ 1. Return [=success=] with data null.
6510
+
6511
+ 1. Let |contexts| be an empty [=/set=] .
6511
6512
6512
6513
1. For each |context id| of |command parameters|["<code>contexts</code>"] :
6513
6514
6514
- 1. Let |context| be the result of [=trying=] to [=get a browsing context=]
6515
- with |context id|.
6515
+ 1. Let |context| be the result of [=trying=] to [=get a browsing context=]
6516
+ with |context id|.
6516
6517
6517
- 1. If |context| is not a [=top-level browsing context=] , return [=error=]
6518
- with [=error code=] [=invalid argument=] .
6518
+ 1. If |context| is not a [=top-level browsing context=] , return [=error=]
6519
+ with [=error code=] [=invalid argument=] .
6519
6520
6520
- 1. [=list/Append=] |context| to |contexts|.
6521
+ 1. [=list/Append=] |context| to |contexts|.
6521
6522
6522
6523
1. For each |context| in |contexts|:
6523
6524
6524
- 1. If |mode| is null and [=cache mode override map=] [=map/contains=]
6525
- |context| [=map/remove=] |context| from [=cache mode override map=] .
6525
+ 1. If |bypass| is true:
6526
+
6527
+ 1. [=set/append=] |context| to [=navigable cache bypass set=] .
6528
+
6529
+ 1. Perform implementation-defined steps to disable any implementation-specific
6530
+ resource caches for network requests originating from |context|.
6531
+
6532
+ 1. Otherwise, if [=navigable cache bypass set=] [=set/contains=]
6533
+ |context|, [=set/remove=] |context| from [=navigable cache bypass set=] .
6526
6534
6527
- 1. Otherwise, set [=cache mode override map=] [|context|] to |mode|.
6528
6535
6529
6536
1. Return [=success=] with data null.
6530
6537
0 commit comments