5. Going the Rest of the Way Offline with Background Sync
In Chapter 4, “Resource Caching,” I showed multiple ways to use service workers and the browser cache to cache web app resources, including application data. That approach works well, because the browser is great at fetching resources and displaying them. All we did was add a manager in the middle to enable our code to control what’s cached and what isn’t. In this chapter, we take app resource caching to the next level, using service workers to enable offline mode in a web app.
We do this using the PWA News app’s Feedback page, shown in Figure 5.1. This page currently displays randomly generated feedback from imaginary site visitors. As we work through the concepts in this chapter, we’ll ...
Get Learning Progressive Web Apps: Building Modern Web Apps Using Service Workers now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.