Real-time caching
Caching does not need to be limited to the service worker installation events. While you should precache your common assets, there are probably many resources that are dynamic in nature. Some example in podcast applications are the individual podcasts and podcast episode pages.
Each podcast contains unique properties, such as a title, description, and logo. Each episode also has a unique title, description, possibly an image, and, of course, the audio file.
These are very dynamic and fluid pieces of data that create many opportunities for new pages and page assets, as well as updates to these same pages and assets. The service worker fetch event handler gives you the hook to intercept all requests to the network so you can ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access