v140 · service worker
ServiceWorkerStaticRouterTimingInfo
Adds timing information for ServiceWorker Static routing API, exposed in navigation timing API and resource timing API for developer use. Service Worker provides timing information to mark certain points in time. We add two Static routing API-relevant timing information: RouterEvaluationStart, time to start matching a request with registered router rules,
concepts
-
Router Timing
PerformanceEntry exposes the Static Routing decision in workerStartTiming / handlerStartTiming fields. Lets RUM tools attribute time to the router vs the network fetch.
-
Route Debugger
Pick a request URL, see which declared route matched, what source served it, and the per-field resource-timing payload — exactly what the new API exposes for RUM.
-
Timing Decoder
The five timing segments visualised as a waterfall: router evaluation, SW boot, handler, network fetch — plus a button to probe a real fetch and dump the entry.
-
Route Matrix
A registered route table you can type a URL against. The first matching rule wins; the table shows which condition was hit and which source served the request.
-
Router Optimization Guide
Runs a simulated timing audit of 10 navigations, charts router evaluation, cache lookup, and network time as stacked waterfall bars per entry, and highlights routes taking >5 ms. An "Optimization suggestions" panel recommends
ignoreVary, simplified URL patterns, and cache-first routes based on the audit results.
why it shipped
Service Worker provides timing information to mark certain points in time. This is exposed and used by the navigation timing API as well as the resource timing API. It currently records two times: