Skip to content

Add new strings for notRestoredReason #11381

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -98093,6 +98093,14 @@ interface <dfn interface>NotRestoredReasons</dfn> {
<code>RTCDataChannel</code> was shut down, so the page was not in a state that could be stored in
the <a href="#note-bfcache">back/forward cache</a>. <ref>WEBRTC</ref></dd>

<dt>"<dfn data-x="blocking-rtc-used-with-ccns" export><code>rtc-used-with-cache-control-no-store</code></dfn>"</dt>
<dd>The <code>Document</code> was created from an HTTP response whose
`<code data-x="http-cache-control">Cache-Control</code>` header included the
"<code data-x="">no-store</code>" token, and it has created a <code>RTCPeerConnection</code> or
<code>RTCDataChannel</code> which might be used to receive sensitive information, so the page was
not in a state that could be stored in the <a href="#note-bfcache">back/forward cache</a>.
<ref>HTTP</ref> <ref>WEBRTC</ref></dd>

<dt>"<dfn data-x="blocking-sensors" export><code>sensors</code></dfn>"</dt>
<dd>The <code>Document</code> <span data-x="request-sensor-access">requested sensor
access</span>.</dd>
Expand Down Expand Up @@ -98161,11 +98169,25 @@ interface <dfn interface>NotRestoredReasons</dfn> {
<dd>The <code>Document</code> used the Web Share API's <code
data-x="dom-Navigator-share">navigator.share()</code> method.</dd>

<dt>"<dfn data-x="blocking-websocket-used-with-ccns" export><code>websocket-used-with-cache-control-no-store</code></dfn>"</dt>
<dd>The <code>Document</code> was created from an HTTP response whose
`<code data-x="http-cache-control">Cache-Control</code>` header included the
"<code data-x="">no-store</code>" token, and it has created a <code>WebSocket</code> connection
which might be used to receive sensitive information, so the page was not in a state that could be

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused with this stuff when there is https://html.spec.whatwg.org/#unloading-document-cleanup-steps

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The difference between the new reason string websocket-used-with-cache-control-no-store and the existing websocket is that the new one also covers the case where a websocket is created and then destroyed before unloading the document.

This is needed as part of the security mitigation when enabling BFCache for page with cache-control: no store header, because the page may receive some sensitive information from the already-closed websocket. We have discussed here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smaug---- does it resolve your confusion, and could you help to review again? Thanks

stored in the <a href="#note-bfcache">back/forward cache</a>. <ref>HTTP</ref> <ref>WEBSOCKETS</ref></dd>

<dt>"<dfn data-x="blocking-webtransport" export><code>webtransport</code></dfn>"</dt>
<dd>While <span data-x="unload a document">unloading</span>, an open <code>WebTransport</code>
connection was shut down, so the page was not in a state that could be stored in the <a
href="#note-bfcache">back/forward cache</a>. <ref>WEBTRANSPORT</ref></dd>

<dt>"<dfn data-x="blocking-webtransport-used-with-ccns" export><code>webtransport-used-with-cache-control-no-store</code></dfn>"</dt>
<dd>The <code>Document</code> was created from an HTTP response whose
`<code data-x="http-cache-control">Cache-Control</code>` header included the
"<code data-x="">no-store</code>" token, and it has created a <code>WebTransport</code> connection
which might be used to receive sensitive information, so the page was not in a state that could be
stored in the <a href="#note-bfcache">back/forward cache</a>. <ref>HTTP</ref> <ref>WEBTRANSPORT</ref></dd>

<dt>"<dfn data-x="blocking-webxr" export><code>webxrdevice</code></dfn>"</dt>
<dd>The <code>Document</code> created a <code>XRSystem</code>.</dd>
</dl>
Expand Down