You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(slightly modified in #6039). I believe this is meant to capture the "evicted from bfcache" case.
However, @rakina noticed in #6039 (comment) that there are cases where we mark a document as unsalvagable, but don't immediately discard it. Notably, "abort a Document", i.e. if the user presses the stop button, or a navigation starts while a document is still loading, or window.stop().
And as far as I know, unsalvagability is also supposed to indicate "do not bfcache".
Thanks Domenic! I think your reasoning is correct. If a document's salvageable bit is false it will cause it to get discarded when we navigate away from it in the step you mentioned. If a parent/ancestor browsing context is navigated, it will set the salvageable bit of the navigating browsing context's document to false too, causing the whole subtree to be discarded. Very subtle :)
https://html.spec.whatwg.org/multipage/browsing-the-web.html#traverse-the-history step 1 checks
(slightly modified in #6039). I believe this is meant to capture the "evicted from bfcache" case.
However, @rakina noticed in #6039 (comment) that there are cases where we mark a document as unsalvagable, but don't immediately discard it. Notably, "abort a Document", i.e. if the user presses the stop button, or a navigation starts while a document is still loading, or
window.stop()
.And as far as I know, unsalvagability is also supposed to indicate "do not bfcache".
Maybe what's supposed to happen here is that unsalvageable documents get discarded when you navigate away from them? Hmm, yes, that looks to be the case: https://html.spec.whatwg.org/multipage/browsing-the-web.html#unloading-documents:concept-document-salvageable-8 .
So maybe there is no issue here. @rakina, can you check my reasoning?
Even so, we might want to add a note clarifying this situation.
The text was updated successfully, but these errors were encountered: