Service Worker dummy
What it is
Service workers act as proxy servers that sit between web applications, the browser, and the network (when available).
They are intended, among other things, to enable the creation of effective offline experiences, intercept network requests, and take action based on whether the network is available and update assets residing on the server.

Example: The request goes through SW. It returns cache data otherwise, go to the network
π https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API
π https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers
Life-cycle
Registration
Installation
Activation
π https://developer.chrome.com/docs/workbox/service-worker-lifecycle#registration
Cache API and Cache Strategy
There is a CacheAPI intended to be used with the SW (but you donβt have to)
π Cache API: https://developer.mozilla.org/en-US/docs/Web/API/Cache
π Cache Strategy: https://developer.chrome.com/docs/workbox/caching-strategies-overview
Examples
Using SW to cache font files
Prefetching + caching assets + Caching network response