9. Automating Service Workers with Google Workbox

In Chapter 4, “Resource Caching,” we wrote a lot of code to implement different caching strategies for the PWA News app. You probably completed that chapter and said something along the lines of “there’s got to be a better way.” Well, there is. With Google Workbox,1 Google, along with the PWA developer community, provides a toolkit developers can use to more easily deliver robust and capable service workers. I’d like to say that you’re writing less code with Workbox, but that’s not the case. You’re still writing code, but you’re writing code that describes how you want your service worker to work rather than the code to actually make it work.

1. https://developers.google.com/web/tools/workbox/ ...

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.