A partial archive of discourse.wicg.io as of Saturday February 24, 2024.

[Proposal] User Agent Launch Type in PerformanceNavigationTiming


Despite the variety of performance measurements available through the current API, it’s difficult to discern from the NavigationType whether the measurements reflect those of a regular navigation under normal browsing or of one where the browser is in a non-optimal performance state, such as a cold start. A browser launch is one of the most expensive performance scenarios commonly encountered in typical PWA and WebView patterns. Our proposal seeks to create a new value for the NavigationType enum to differentiate this condition from others in measurements of web application performance.

Modifying the NavigationType to include state for a user agent launch (i.e. useragent_launch) will enable engineers to determine whether a given measurement is taken from a launch scenario, enabling greater differentiation of application performance from browser performance in scenarios where the browser engine is launched and terminated frequently. Examples include: Electron apps, system WebViews, or other application scenarios where the browser is relatively short-lived or commonly launched from a terminated state.

Link to Explainer


Please take a look at Detecting whether a navigation was BFCache-eligible · Issue #179 · w3c/navigation-timing · GitHub . TL;DR it is not possible to tell whether the page load was eligible for BFCache or not. I hope a common solution is possible or at least that the eventual solution bears the BFCache case in mind.

What is the reason to add a new type and change some existing behaviour, vs adding a new field or fields to record how the page was launched?

Since this proposal is concerned with whether the launch was at a time of resource competition, wouldn’t you want to distinguish between

  • a browser cold start
  • a restore as part of profile launch
  • restore of a tab
  • clone of a tab
  • restore of a large group of tabs ?