← Back to release summary

NavigationActivation

Category
Miscellaneous
Type
New or changed feature
Status
Enabled by default (Chrome 123)
Intent stage
None

Summary

navigation.activation stores state about when the current Document was activated (e.g., when it was initialized, or restored from the back/forward cache).

Motivation

In some cases, like in view transition, developers want to customize the page/style/what not based on the last/current navigation: which URL did it come from, was it a back navigation, etc. For example, show a welcome message but not if it's a back navigation, or run a different animation if coming from the home page.

Standards & signals

Explainers: https://github.com/WICG/view-transitions/blob/main/navigation-activation-explainer.md

View on chromestatus.com