← Back to release summary

Back/forward cache NotRestoredReason API

Category
JavaScript
Type
New or changed feature
Status
Origin trial (Chrome 123)
Intent stage
Start prototyping

Summary

NotRestoredReason API reports the list of reasons why a page is not served from BFcache in a frame tree structure, via PerformanceNavigationTiming API.

Motivation

Today pages can be blocked from BFcache for different reasons, such as reasons required by spec and reasons specific to the browser implementation. Developers can gather the hit-rate of BFCache on their site by using the pageshow handler persisted parameter and PerformanceNavigationTiming.type(back-forward). However, there is no way for developers to tell what reasons are blocking their pages from BFCache in the wild. They are not able to know what actions to take to improve the hit-rate. We would like to make it possible for sites to collect information on why BFCache is not used on a history navigation, so that they can take actions on each reason and make their page BFCache compatible.

Standards & signals

Docs: https://github.com/rubberyuzu/bfcache-not-retored-reason/blob/main/NotRestoredReason.md#security-and-privacy

Explainers: https://github.com/rubberyuzu/bfcache-not-retored-reason/blob/main/NotRestoredReason.md

View on chromestatus.com