-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API shape for monitoring new navigation-like entries such as App History, BFCache, etc #182
Comments
^^ @domenic |
Thanks for starting this thread! From the web developers we've talked to who work on SPAs, they expect to not start getting SPA navs from their cross-document nav telemetry endpoints, and they expect to get a different set of data. In particular they found the idea of getting all the network timing stuff for SPA navs confusing. Also, a couple points of clarification:
|
In meeting with a number of RUM analytics providers, Google has heard solid support for a new event type for bfcache navs, rather than exposing them as There's also a lot of interest, in that case, to have a future-proof "all-navigations" observer (we didn't ask for opinions on the name there; I'm sure there's room to bikeshed) |
#192 is the start of an attempt to add support for this. It seems that there are a couple of ways we could go to have the spec recognize certain performance entries as 'navigations':
These should all be invisible to the user; this is just about spec ergonomics, and how easy it is to expand on this idea in the future. My inclination is to avoid over-engineering by starting with #2 (an |
There's also been significant discussion of this on WICG/soft-navigations#12, but I'll try to steer that discussion back here, since this is where it would eventually need to be implemented. It sounds like what we need is
And maybe, for ergonomics:
|
As a followup to recent changes for the WICG App History proposal to integrate it with the PerformanceTimeline, we discussed on a recent W3C WebPerf call what kind of API shape would be ideal for monitoring all of the new possible navigation entry types, e.g.:
PerformanceNavigationTiming
navigation
keyword in a PerformanceObserver.name
(URL), etcSameDocumentNavigationEntry
type.success
,.startTime
and.duration
fields onlyPerformanceNavigationTiming
?.duration
is not appropriate?One question is: How we want these new navigation types to integrate with the existing PerformanceTimeline and PerformanceObservers?
Today, you simply get a single "the navigation" NavigationTiming entry if you do this:
With these new possible "navigation-like" types, would you get additional entries from the above observer?
Or should we expose them elsewhere?
For example, we may want to require developers to specifically observe new types if they want them (for back-compat):
We could also offer a new "super" type to listen for, that would emit entries for the above navigations, plus any new ones that are created in the future:
The alternative is to simply emit these new ones under the
navigation
observer, as IIRC we crawled the web and found that nearly everyone looking at NavigationTiming from a PerformanceObserver was just looking at the[0]
th entry.We had some discussion about this on a recent call, and you can find our minutes here;
This issue is intended as a continuation of that discussion to gather more feedback on the above ideas.
The text was updated successfully, but these errors were encountered: