ServiceWorkerUpdateListener
workbox
ServiceWorkerUpdateListener | workbox | |
---|---|---|
2 | 31 | |
4 | 12,102 | |
- | 0.5% | |
0.0 | 6.5 | |
over 2 years ago | 6 days ago | |
JavaScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
ServiceWorkerUpdateListener
-
React PWA with Workbox
To start, it might be worth your while to study this post. You can continue without it but it's probably where I learned the most about this stuff. Buried in the comments someone posted this bit of JavaScript, which does for us everything we need. We're going to use a barely-modified version of Mark's ServiceWorkerUpdateListener.js:
- The ServiceWorkerUpdateListener interface extends the Service Worker API by providing a convenient way to receive update events when ServiceWorkerRegistration acquires new service workers.
workbox
-
A deep-dive on a Progressive Web App implementation for a React-based App Platform (DHIS2)
We use the Workbox library and its utilities as a foundation for our service worker.
- Workbox: JavaScript Libraries for Progressive Web Apps
-
are PWA supposed to work offline ?
Btw, Workbox is effectively deprecated now. The dev in charge of it left Google for a real company 6+ months ago and no one has filled his shoes. The other day, the lady who is "maintaining" it now finally acknowledged that nothing is going to happen to it any time soon. https://github.com/GoogleChrome/workbox/issues/3149
- New React docs pretend SPAs don't exist anymore
-
[AskJS] technology stack for PWA, ServiceWorker and offline first web app?
Start from the https://github.com/GoogleChrome/workbox
- How to make your website work offline
-
Allowing users to fully cache a website for offline use?
Look into Workbox if you're okay writing code for that or Progressier otherwise.
-
Service Worker Caching Strategies
If you want to try some of these patterns, you can use the https://developers.google.com/web/tools/workbox library that provides all the features out-of-the-box.
-
Vite in the browser
Here is an example using workbox.
-
Custom Service Worker Logic in Typescript on Vite
I recently had a tiny website project which I wanted to make available offline. This is achieved by adding a Service Worker. And thanks to projects like workbox, getting basic functionality like caching for offline-use is fairly easy to set up.
What are some alternatives?
supabase - The open source Firebase alternative.
Socket.io - Realtime application framework (Node.JS server)
react-workbox-tutorial - a brief tutorial covering the basics of using create-react-app with Workbox, including: updating service worker and refresh, caching GET requests, and background sync.
comlink - Comlink makes WebWorkers enjoyable.
lighthouse - Automated auditing, performance metrics, and best practices for the web.
redux - A JS library for predictable global state management
vite - Next generation frontend tooling. It's fast!
angular-styleguide - Angular Style Guide: A starting point for Angular development teams to provide consistency through good practices.
AngularJS - AngularJS - HTML enhanced for web apps!
self-destroying-sw - Code-snippets and guides on removing ServiceWorker from a websiste.
sqlite-worker - A simple, and persistent, SQLite database for Web and Workers.