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:
Start time
Fetch event dispatch time
However, it currently does not have any fields related to the ServiceWorker Static Routing API. Developers would benefit from having fields that provide information such as:
the matched route (the route that the Static Routing API evaluated)
the actual source from which the resource was retrieved
the time it took to match the route
the time to look up the cache for the cache source
This information will allow developers to measure the latency incurred by the API such as router evaluation time or time required to conduct cache lookup, or determine if the matched source is the final source used (can find out if the matched source failed to get the resource or not, and which source was used as the alternative).
WebKittens
No response
Title of the spec
Timing Info for ServiceWorker static routing API
URL to the spec
https://github.com/WICG/service-worker-static-routing-api/blob/main/resource-timing-api.md
URL to the spec's repository
https://github.com/WICG/service-worker-static-routing-api
Issue Tracker URL
No response
Explainer URL
https://github.com/WICG/service-worker-static-routing-api/blob/main/resource-timing-api.md
TAG Design Review URL
https://github.com/w3ctag/design-reviews/issues/958
Mozilla standards-positions issue URL
https://github.com/mozilla/standards-positions/issues/1031
WebKit Bugzilla URL
No response
Radar URL
No response
Description
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:
However, it currently does not have any fields related to the ServiceWorker Static Routing API. Developers would benefit from having fields that provide information such as:
This information will allow developers to measure the latency incurred by the API such as router evaluation time or time required to conduct cache lookup, or determine if the matched source is the final source used (can find out if the matched source failed to get the resource or not, and which source was used as the alternative).