Bug 250331

Summary: Add navigationId to PerformanceEntry and subclasses
Product: WebKit Reporter: Ian Clelland <iclelland>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Enhancement CC: achristensen, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   

Description Ian Clelland 2023-01-09 11:35:29 PST
(Presuming that https://github.com/w3c/performance-timeline/pull/192 and the related HTML change https://github.com/whatwg/html/pull/7370 land)

PerformanceEntry obejcts (https://w3c.github.io/performance-timeline/#the-performanceentry-interface) should track the number of times that a loaded document has appeared to the user to navigate. Initially this is a count of back-forward cache restorations, which are indistinguishable to the user from other history navigations. The intention is to extend this to include single-page-app (SPA) transitions which mimic traditional navigations (see https://github.com/WICG/soft-navigations), with other extensions possible in the future.

The overall change here is that PerformanceEntry's IDL becomes

      interface PerformanceEntry {
        readonly    attribute DOMString           name;
        readonly    attribute DOMString           entryType;
        readonly    attribute DOMHighResTimeStamp startTime;
        readonly    attribute DOMHighResTimeStamp duration;
        readonly    attribute unsigned long       navigationId;
        [Default] object toJSON();
      };

where navigationId is set to the value of a similar counter on the document where the entry originated. This counter starts at 1 for the initial (network) navigation, and is incremented by back-forward-cache restoration events (and in the future by detected SPA navigations)
Comment 1 Radar WebKit Bug Importer 2023-01-16 11:36:16 PST
<rdar://problem/104303481>