demo · v131
ServiceWorkerStaticRouterTimingInfo
PerformanceResourceTiming now carries the per-request static-router timings: when the router was consulted, which source matched (cache / SW / network), and when each phase finished. Pick a route source to see the equivalent fields you'd read off a real PerformanceResourceTiming entry.
PerformanceResourceTiming.{router fields}
request timeline
the api
const obs = new PerformanceObserver((list) => {
for (const e of list.getEntries()) {
console.log(e.name, {
workerStart: e.workerStart,
workerRouterEvaluationStart: e.workerRouterEvaluationStart,
workerMatchedSourceType: e.workerMatchedSourceType, // NEW in 131
workerFinalSourceType: e.workerFinalSourceType, // NEW in 131
workerCacheLookupStart: e.workerCacheLookupStart, // NEW in 131
});
}
});
obs.observe({ type: "resource", buffered: true });