How can a page tell that the API exists in the browser but that the current page was not eligible for BFCache?
E.g.
go to a page that will not be cached
click on a link
go back
4 duplicate the tab
performance.getEntriesByType('navigation')[0].type will be "back_forward"
performance.getEntriesByType('navigation')[0].notRestoredReasons will be undefined.
It's impossible to tell if the API is not implemented or it's missing because BFCache is impossible for a duplicated tab.
Perhaps the field should always be present but null when BFCache was impossible. We need to be careful about "not possible for that page at that time" vs "impossible for that navigation".
How can a page tell that the API exists in the browser but that the current page was not eligible for BFCache?
E.g.
performance.getEntriesByType('navigation')[0].type
will be"back_forward"
performance.getEntriesByType('navigation')[0].notRestoredReasons
will beundefined
.It's impossible to tell if the API is not implemented or it's missing because BFCache is impossible for a duplicated tab.
Perhaps the field should always be present but
null
when BFCache was impossible. We need to be careful about "not possible for that page at that time" vs "impossible for that navigation".