Skip to content
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
12 changes: 12 additions & 0 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -103069,6 +103069,18 @@ interface <dfn interface>NotRestoredReasons</dfn> {
<dd>This <code>Document</code> was in the <span>owner set</span> of a
<code>SharedWorkerGlobalScope</code>.</dd>
Copy link
Member

Choose a reason for hiding this comment

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

Now that we have more specific reasons and in some cases can actually BFCache with SharedWorkers, maybe add a note that this reason is only possible in implementations that don't support that, and the new reasons are the scenarios that will prevent BFCaching instead?


<dt>"<dfn data-x="blocking-sharedworker-with-no-active-client"
export><code>sharedworker-with-no-active-client</code></dfn>"</dt>
<dd>This <code>Document</code> was in the <span>owner set</span> of a
<code>SharedWorkerGlobalScope</code> that is not <span data-x="active needed worker">actively
needed</span>.</dd>

Choose a reason for hiding this comment

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

I can't understand this. How is this a blocking reason?

Copy link
Author

Choose a reason for hiding this comment

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

When all clients enter BFCache, the SharedWorker is no longer actively needed. The User Agent might choose to terminate the worker to prevent resource waste and potential privacy risks associated with keeping it alive indefinitely.

Since this termination breaks the connections held by the BFCached clients, we must evict them to prevent restoring pages in a broken state. (Ideally, the SharedWorker would be frozen in this case to allow clients to remain in BFCache.)


<dt>"<dfn data-x="blocking-sharedworker-message"
export><code>sharedworker-message</code></dfn>"</dt>
<dd>While the page was stored in <a href="#note-bfcache">back/forward cache</a>, a message was
received from a <code>SharedWorkerGlobalScope</code> whose <span>owner set</span> <span
data-x="list contains">contains</span> this <code>Document</code>.</dd>

<dt>"<dfn data-x="blocking-smartcard" export><code>smartcardconnection</code></dfn>"</dt>
<dd>The <code>Document</code> had an active <code>SmartCardConnection</code> while <span
data-x="unload a document">unloading</span>.</dd>
Expand Down