cloudfour / pwastats

A directory of Progressive Web App case studies.
https://www.pwastats.com
MIT License
101 stars 8 forks source link

Use Workbox for service worker needs #161

Open gerardo-rodriguez opened 6 years ago

gerardo-rodriguez commented 6 years ago

Google's Workbox library has matured quite a lot. We should refactor the service worker to use the Workbox library to generate the service worker instead. 😉

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

Why Workbox? Workbox is a library that bakes in a set of best practices and removes the boilerplate every developer writes when working with service workers.

  • Precaching
  • Runtime caching
  • Strategies
  • Request routing
  • Background sync
  • Helpful debugging
  • Greater flexibility and feature set than sw-precache and sw-toolbox
gerardo-rodriguez commented 6 years ago

This could be something you can look into as well @calebeby. 😉