Thanks Domenic!Fergal's thread is discussing a slightly different case:A --> B --(back)--> A --(browser restart)--> A'On A' , the navigation type is back-forward.I think this is expected because the navigation type is copied from A, whose latest navigation was back-forward.What I found is that, every time a tab is cloned or the browser is restarted, the navigation type is back-forward.A --(browser restart / tab clone) -->A'On A', the navigation type is back-forward.This is surprising in that tab clone and browser restart is indistinguishable from normal history navigation.I'm concerned about developers calculating the bfcache hitrate.With the current navigation type, I don't think developers can tell the difference between tab clone/ browser restart vs actual history navigation.
On Mon, Sep 25, 2023 at 11:30 AM Domenic Denicola <dom...@chromium.org> wrote:I'm aware of some discussion of related areas, but not this particular problem:
- Microsoft Edge proposal (never implemented?) for a "user agent launch" type, sort of related to your quit-and-reopen case
- +Barry Pollard discussing adding a "restore" type, and the connection to document.wasDiscarded.
- Fergal discussing the browser restart case
On Thu, Sep 21, 2023 at 2:57 PM Yuzu Saijo <yu...@google.com> wrote:Hi all,I realized a surprising behavior of the PerformanceNavigationTiming API.When I duplicate a tab / quit the browser and reopen a tab, the navigation type (performance.getEntriesByType("navigation")[0].type) is “back_forward”.The behavior is the same on Firefox, while on Safari the navigation type stays the same as the previous state. You can test it with this site.Is this expected or specced anywhere?Thanks,Yuzu
--
You received this message because you are subscribed to the Google Groups "bfcache-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bfcache-dev...@chromium.org.
To view this discussion on the web, visit https://groups.google.com/a/chromium.org/d/msgid/bfcache-dev/CAP-nMoGm-3cTANt0%2Brdh25OKsKTj0HsibhgSxc0L4WgUC-zRvg%40mail.gmail.com.
On Mon, 25 Sept 2023 at 12:30, 'Yuzu Saijo' via bfcache-dev <bfcac...@chromium.org> wrote:Thanks Domenic!Fergal's thread is discussing a slightly different case:A --> B --(back)--> A --(browser restart)--> A'On A' , the navigation type is back-forward.I think this is expected because the navigation type is copied from A, whose latest navigation was back-forward.What I found is that, every time a tab is cloned or the browser is restarted, the navigation type is back-forward.A --(browser restart / tab clone) -->A'On A', the navigation type is back-forward.This is surprising in that tab clone and browser restart is indistinguishable from normal history navigation.I'm concerned about developers calculating the bfcache hitrate.With the current navigation type, I don't think developers can tell the difference between tab clone/ browser restart vs actual history navigation.Yeah, it seems to me that a tab-clone/restart is more like reload.I think the spec has nothing at all to say about tab clones and restarts, is that correct?
I would have expected that tabs loading after a browser restart would have appeared as a new navigation. Back-forward is almost certainly wrong, since there is no chance that the page state would have been preserved.Tap Duplication is an undefined case, and we've definitely seen oddness in other areas in the past around that. But it makes sense to me that the initial navigation event should be cloned from the original tab; that duplicating the tab wouldn't count as a "navigation" for either clone.