-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Add new strings for notRestoredReason for SharedWorker #12086
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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> | ||
|
|
||
| <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> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't understand this. How is this a blocking reason?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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> | ||
|
|
||
There was a problem hiding this comment.
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?