This document describes the status of the current implementation of the Timing Info for ServiceWorker Static Routing API in Chrome, and how to enable it.
Note that this feature is not available by default. Chrome plans to do an origin trial starting from M131 to evaluate its effectiveness and to allow site authors to give feedback.
The API is implemented according to the explainer.
Following new fields are added to the resourceTimingAPI:
In addition, a new value cache-storage
is added to the deliveryType
field. Please refer to the explainer for details about each field.
The API can be enabled by participating in the Origin Trial.
The feature is named ServiceWorkerStaticRouterTimingInfo
. Registration for the trial is here. See feature status to find out if the origin trial is currently running.
The origin trial tutorial describes how to participate.
In devtools, run the following piece of javascript after navigating to a page which uses ServiceWorker static routing API.
performance.getEntriesByType('navigation')[0].matchedSourceType;
If it gives you a value, it succeeds. If it gives undefined
then the feature is not enabled.