yu...@chromium.org, fer...@chromium.org
https://github.com/rubberyuzu/bfcache-not-retored-reason/blob/main/NotRestoredReason.md
(Not yet ready)
NotRestoredReason API will report the list of reasons why a page is not served from BFcache in a frame tree structure, via PerformanceNavigationTiming API.
Today pages can be blocked from BFCache for different reasons, such as reasons required by spec and reasons specific to the browser implementation.
For example, if a page uses a feature such as WebLock and does not release the acquired lock in the pagehide handler, Chrome does not put the page into BFCache. If developers want to make their site restored from BFCache, they have to release the lock in the pagehide handler.
Developers can gather the hit-rate of BFCache on their site, i.e. what % of history navigation is served by BFCache, 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.
https://github.com/whatwg/html/issues/7094
https://discourse.wicg.io/t/proposal-back-forward-cache-notrestoredreason-api/5773
(Not sent yet)
Gecko: Positive feedback on the GitHub discussion (link)
WebKit: No signal
Web developers: Positive reactions in TPAC WebPerf WG (minutes)
No
(Not yet ready)
False
No milestones specified
https://chromestatus.com/feature/5684908759449600