Browser > Server
- modify and create HTTP response
- before the requests reach the Internet
Server > Browser
This section explains the http cache feature.
The first time a user visits your page using a browser that supports service worker, all of the resources needed to use the page offline can be automatically cached locally, and each subsequent visit to any page on the site will be:
- a) fast (since there's no network dependency)
- b) work offline (for the same reason).
The service worker needs to be registered (associated with) against:
sw-toolbox and sw-precache are deprecated in favor of Workbox.
- https://github.com/puppeteer/examples/blob/master/verify_sw_caching.js - Verify all the resources you expect are being cached by a service worker for offline.