Read-through caching is an assertive approach of all-out caching for the type of static content that you visit regularly. This is not very suitable for dynamic content such as news and sports. A selective caching approach would be better suited for such instances. Read-through caching saves us bandwidth for the server as well as requests over the network. The way read-through caching works is that after the service worker takes control of your page when the first fetch()
request is called, the response will be cached and subsequent requests to the same URL will be served from the cache.
To get started with service workers, you will need to have the service worker experiment feature turned on in your browser settings. If you have not done this yet, refer to the first recipe of Chapter 1, Learning Service Worker Basics: Setting up service workers. Service workers only run across HTTPS. To find out how to set up a development environment to support...