bionvictoria.blogg.se

Chrome sessionrestore
Chrome sessionrestore










This is handled by ClassifyNavigation, which determines which RendererDidNavigate helper methods are used when a navigation commits. These types may lead to different outcomes for whether a new NavigationEntry is created, whether an existing one is updated vs replaced, and what events are exposed to observers. Much of the complexity in NavigationController comes from the bookkeeping needed to track the various types of navigations as they commit (e.g., same-document vs cross-document, main frame vs subframe, with or without replacement, etc). NavigationController uses these ISNs and DSNs when deciding which frames need to be navigated during a session history navigation, using a recursive frame tree walk in FindFramesToNavigate. Cross-document navigations create a new ISN and DSN.

chrome sessionrestore

Same-document navigations create a new session history item without changing the document, and thus have a new ISN but the same DSN. Identifying Same- and Cross-Document NavigationsĮach FrameNavigationEntry contains both an item sequence number (ISN) and a document sequence number (DSN).

  • The first non-blank URL after the initial empty document (unless the frame was explicitly created with about:blank as the URL).
  • history.replaceState (which is always same-document).
  • location.replace (which is usually cross-document, unless it is a fragment navigation).
  • Some types of navigations can replace the previously committed joint session history item for a frame, rather than creating a new item. Any subsequent navigations in the subframe create new joint session history items (which we refer to as “manual subframe navigations”), such that clicking back goes back within the subframe. The user can't go back to the state before the frame committed. When the first commit occurs within a new subframe of a document, it becomes part of the existing joint session history item (which we refer to as an “auto subframe navigation”). This pruning is performed for all new navigations, unless they commit with replacement. However, joint session history is tracked as a list and not as a tree, so the previous forward history is “pruned” and forgotten.

    chrome sessionrestore

    If the user goes back and then commits a new navigation, this essentially forks the joint session history.

    chrome sessionrestore

    Identifying Same- and Cross-Document Navigations.












    Chrome sessionrestore