Closed rubberyuzu closed 8 months ago
Position requests for Mozilla and WebKit. This is the discourse discussion.
Mozilla seems fine with this repo moving to the WICG org.
We would like to have notRestoredReasons
for our RUM measurements in Akamai mPulse.
We are starting to track BFCache-based navigations, and with that our RUM customers will become more interested in why specific navs were not BFCache-eligable. Gathering this information will be a huge help in pointing out the culprits in aggregate.
The repo is now live at https://github.com/WICG/bfcache-not-restored-reason
Happy incubation!!
Introduction
Currently developers can tell whether BFCache is being used or not but they cannot tell what reasons are blocking it from being used and what actions to take to improve their hit-rate. DevTools provide the testing feature to tell developers what reasons are blocking, but that is only for lab testing and not for gathering the data from the wild.
One way to solve this issue would be to provide an API to report the reasons why the page was not restored from bfcache if not. One idea is to extend PerformanceNavigation API to include this information as below:
It will have notRestoredReasons field that will contain the reasons in the frame tree structure. Note that this would risk exposing cross-site information, so we should avoid reporting reasons from the cross-origin subframes.
Read the complete Explainer.
Feedback
I welcome feedback in this thread, but encourage you to file bugs against the Explainer.