-
Notifications
You must be signed in to change notification settings - Fork 26
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
An event for when entries disappear for other reasons than forward-pruning #72
Comments
@domenic I think I meant that it'd be good to always know with certainty when the user has navigated back (back button or API) vs forward (link, fragment, forward button or API). Currently both dispatch the RE: "cut in half" example. It's an interesting case, and I'd certainly like to have an event for it. E.g. if an app keeps DOM/state for a previous navigation associated with the history stack then the app might want to clear out this DOM/state when the history records are pruned. However, a couple of comments on this:
|
In my opinion:
But I think we want to emulate as close to possible organically having two same-origin websites sandwiching a non-same-origin website when the bisection event happens. We wouldn't expect to get dispose events in one website for something that happened in another part of the stack. Bisection, I think, should completely clear in-memory associations between two same-origin website instances. When you do that replace, nothing else that happens on the other side should reach you. |
This means the client may hold Another complication is, the split may be un-splut. Although, if we fire "dispose" on these, and if Maybe we should just have an event that signals an |
With regards to the three items:
|
Agreed, this will remove entries from the navigation API. I believe the browser completely throws away any info about those entries. The page will get This needs to be specced, but seems uncontroversial.
Well, basically most (all?) browsers seem to limit the total number of joint history entries per TLBC (in Chrome's case I know the number is 50). Similar to the previous item, they completely throw away the entries. So the plan is to spec that, with I think this would most clearly show up if you navigated to 50 same-origin (or even same-document) pages: at some point Could this reveal cross-origin information? Hmm, it seems possible, in the same way |
@domenic I guess I'm wondering why the page would still be up and not reloaded for 1. We haven't had a chance to revisit that UI in Firefox recently though. For 2 I think the problem is similar to |
Refreshing myself on whatwg/html#2018 I am currently thinking the boundary is that we are OK leaking the fact that a cross-origin iframe navigated. (We fire I don't think I am trying to confirm this with our security folks to see if there's anything I missed. |
I realized that there is a difference with Given that you only have access to contiguous same-origin entries it seems that the only information you can get out of this is how much the user "used" a tab before getting to your site. That's correct, right? That doesn't seem particularly severe, though it would still be good if it could be tackled in some way. |
But, the fact that
I think that's right. And if we implement any of the ideas in whatwg/html#6356 then that limits the damage a bit. That might be the right way to tackle things. (Note, session scoping on manual navigation is quite different from BCG scoping; see also #71.) |
In Chrome I tested this and:
I'll ask around a bit more about the threat model here that motivated us not reloading. |
I was informed that simultaneously reloading all open pages when you clear all browsing data would give a cross-site identifier that you can join. Right, that makes sense! You could mitigate this somewhat, at the expense of a worse user experience, if you shut down all pages, waiting for them all to shut down, cleared all browsing data while there were no pages open, and then reopened the pages. This would then give a weaker cross-site tracking identifier, based on the first-visit time for a domain. You could imagine mitigations to try to fuzz these times, similar to other times that we fuzz for global events (like language changes). But basically this is a hard area. |
@annevk suggested that the simultaneous reload timing issue might be best mitigated by browsers unloading all tabs during a clear-browsing-data instance, and then only reloading them once the user navigates to them. Similar to what happens on a browser restart. That makes a lot of sense to me. With regard to the navigation API, we think the conclusion is that: So, I'm removing "might block v1", as we think we have a clear path here with no compat issues. However I'm leaving the issue open to track properly specifying That specification work might be best done as part of #221. |
We currently have the
dispose
event for when app history entries get dropped due to "forward-pruning", as discussed in https://github.com/WICG/navigation-api#per-entry-events.However, talking with implementation folks, there are some other cases where entries get pruned:
https://example.com/1
,https://example.com/2
,https://example.com/3
. All pages are in bfcache.https://example.com/2
location.replace("https://other.example.com/")
https://example.com/1
, it will see 1 entry in its navigation API history entry list, instead of the 3 it saw before, because there is only one same-origin contiguous entry. (Same for navigating forward tohttps://example.com/3
.)The third of these is a bit different than the first two, and might warrant different treatment.
Anyway, the question is, should the
dispose
event fire for these scenarios? From what I can tell the same use cases, e.g. removing associated caches, apply.Offline, @dvoytenko mentioned that if an event fires, it should not be the same as the event for forward-pruning. But I didn't quite understand why.
The text was updated successfully, but these errors were encountered: