This effort will expose an API on the `FetchEvent` dispatched within a service worker context that allows additional timing information to be associated with the intercepted network load. This information will then be accessible in the main thread context on the resulting `PerformanceResourceTiming` entry.

Motivation

Currently it is somewhat difficult for sites to measure the performance of service worker script that is executed while handling a FetchEvent. The service worker script can take measurements, but there is no easy way to associate this data back to the original network request. It requires an out-of-band communication mechanism like postMessage() or a server beacon with further data stitching to get a coherent view of the load. The goal of this feature is to make it easier to measure and understand the performance of service worker FetchEvent processing on network loads.

Documentation

Status in Chromium

Blink>PerformanceAPIs


Proposed (tracking bug)

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

  • No signal
  • No signal
  • Positive

Owner

Last updated on 2021-11-12