This feature implements two new PerformanceEntry types, added to the performance timeline (i.e. via PerformanceObserver): "soft-navigation", and "interaction-contentful-paint". The `InteractionContentfulPaint` PerformanceEntry reports any new Contentful Paints within parts of the page that are known to have been previously modified by an Interaction. The `PerformanceSoftNavigation` PerformanceEntry reports on same document history state changes that are known to have been initiated by an Interaction, but only if it has also made some contentful update to the page. This new entry helps define the criteria, and establish a new "time origin" for "slicing" the performance timeline by "soft-navigations" (i.e. attributing all performance data to the correct url/route, rather than the initial URL of the initial document). Both entries rely on a common infrastructure: - Observing new Interactions (via Event Timing integrations) - Establishing a Task-scheduling-persistent "context"(i.e. AsyncContext, via Task Attribution) - Observing effects such as dom content modifications, or same document history state changes, and checking if the currently running task has an "active context" to attribute this change to. - Integration with Paint Timing and LCP (partially modelling new Container Timing concepts).
Web developers have been asking for a way to take "soft navigations" - JS-driven navigations in Single Page Apps (SPA) - into account when exposing performance metrics. This exposes a browser heuristic to that effect. This would enable developers to initially validate the heuristic compared to their own application- and framework- specific heuristics. Once validated, they can start relying on it when calculating the performance impact of various routes in their SPAs.
Explainers: https://github.com/WICG/soft-navigations https://github.com/WICG/soft-navigations/blob/main/Design.md