Adds a fetch event listener that serves content from the browser cache when available. When a request is not in the cache, it will be fetched from the network and added to the cache if the route has `service_worker_max_age' feature defined or if the request is a prefetch.
Transform method from HTTPMethod type to uppercase HTTPMethod type from workbox the way typescript tolerates
Generated using TypeDoc
Handles prefetching and caching in the service worker. Responses are cached based on the
service_worker_max_age
feature or equivalentbrowser.serviceWorkerSeconds
cache setting in your rules.Example routes.js
Example Service Worker