1

I am using the PerformanceObserver API in a web extension to get the PerformanceNavigationTiming.

this.performanceObserver.observe({ type: "navigation", buffered: true })

I have several users that installed my extensions and globally I have good value. However, I saw that from time to time I receive wrong values. Here an example:

{
  "name": "anonymized",
  "entryType": "navigation",
  "startTime": 0,
  "duration": 1618111,
  "initiatorType": "navigation",
  "nextHopProtocol": "http/1.1",
  "workerStart": 0,
  "redirectStart": 1617474,
  "redirectEnd": 1617474,
  "fetchStart": 1617474,
  "domainLookupStart": 1617474,
  "domainLookupEnd": 1617474,
  "connectStart": 1617474,
  "connectEnd": 1617474,
  "secureConnectionStart": 1617474,
  "requestStart": 1617481,
  "responseStart": 1617573,
  "responseEnd": 1617573,
  "transferSize": 8380,
  "encodedBodySize": 7609,
  "decodedBodySize": 37651,
  "serverTiming": [],
  "unloadEventStart": 1617578,
  "unloadEventEnd": 1617578,
  "domInteractive": 32,
  "domContentLoadedEventStart": 91,
  "domContentLoadedEventEnd": 93,
  "domComplete": 1618094,
  "loadEventStart": 1618094,
  "loadEventEnd": 1618111,
  "type": "reload",
  "redirectCount": 0
}

There are 2 facts that make me doubt about the validity of this PerformanceNavigationTiming:

  1. The duration reported is over 25 minutes, and this is unlikely
  2. Checking the MDN PerformanceNavigationTiming page, it shows that the domContentLoadedEventStart and domContentLoadedEventEnd are happening in the processing block, almost at the end of the navigation cycle. However, here we have a really low values, respectively 91 and 93.

Do you know if I am missing something? Or maybe is there a bug on the API?

Thanks

Andrea11
  • 13
  • 3

0 Answers0