ServiceWorker static routing API demo
ServiceWorker static routing API is the new API that allows developers to declaratively register routing info at the install phase in ServiceWorker. By registering the routing, the browser can get response directly from the network, cache storage. Also speed up simple offline-first, online-first routes by avoiding ServiceWorker startup time. The explainer for more details. Registered routing info in this demo is logged in the DevTools console. Also in chrome://serviceworker-internals. For the local testing, you can enable the API from chrome://flags/#service-worker-static-router if needed.
Example links by use cases:
- Single URLPattern conditions, source from network
- Single URLPattern conditions, source from fetch handler
- Single URLPattern conditions, source from cache
- Single URLPattern conditions, source from the race between the network request and the fetch handler
- Single URLPattern conditions, source from the network, which won the race between the network request and the fetch handler
- Single URLPattern conditions, source from the fetch handler which won the race between the network request and the fetch handler