demo · v140
ServiceWorker Static Router Timing
Pick a router rule and watch what a PerformanceObserver would receive. The v140 workerRouterEvaluationStart / workerCacheLookupStart fields let RUM tools attribute time to the router decision separately from the fetch handler.
Visualised navigation timing:
PerformanceNavigationTiming entry (simulated):
const obs = new PerformanceObserver(list => {
for (const e of list.getEntries()) {
console.log(e.workerRouterEvaluationStart); // v140
console.log(e.workerMatchedSourceType); // "cache" | "network" | "fetch-event"
console.log(e.workerCacheLookupStart);
}
});
obs.observe({ type: "navigation", buffered: true });
see also
- ServiceWorkerStaticRouterTimingInfo — feature index
- ChromeStatus entry