-
Notifications
You must be signed in to change notification settings - Fork 23
Bring back support for prerendering page state #69
Comments
FYI: discussed this in the Dec 3 call It was mentioned that, specifically for analytics, tools might want to know about previous state of prerendering. This is similar to #29 for It sounded during the call like @nicjansma might have some insight in this area :) Nic: Do you know of any specific use cases or what analytics packages might want to do with this information (or where I might look)? #29 is distinctly about performance measurement which means they want it tied to PerformanceEntries - ideally that would be helpful for performance use cases generally and not just visibility. However, I'm wondering if there's anything specific for prerendering? If so, would a simple "did load in prerender" bit be enough. |
I've got an explainer for a partial interface Document {
readonly attribute boolean prerendering;
attribute EventHandler onprerenderingchange;
}; It's too early to request anything resembling an official position from WebKit/Gecko but @rniwa @bdekoz - do you have any high level thoughts about this approach, or anything obviously objectionable from WebKit/Gecko's perspective? (Or could loop in the right people if that's not you?) I'd like to start implementing this behind a flag for experiment so it'd be great to get some feedback early. |
This is handled in https://wicg.github.io/nav-speculation/prerendering.html |
Hi all!
Following up on the TPAC meetup about bringing back prerendering to the web platform. I'd like propose a way to (re-)expose prerendering state to the page.
I've compiled some research and thought on existing uses of
visibilityState
and related issues and drew some conclusions and maybe a path forward.Would appreciate any feedback/thoughts/opinions.
To summarize some of the background:
visibilityState: 'prerender'
visibilityState != 'visible' ==> 'hidden'
Proposal
Add a new
document.prerendering
flag (and associated change event)Add a
becameDisposable
eventvisibilityState
return the true visibility status of a page. This is difficult if it's also an unload signal for the page (see The spec's definition of hidden is unclear and should be updated to better account for mobile use cases #59).Thanks!
The text was updated successfully, but these errors were encountered: