Minimal offline-ready Service Worker example
Ask by ICSM Computer
Updated 12 Aug 2025
1. Project Structure
2. index.html
A basic page with a linked JS file to register the service worker.
3. app.js (Registers the service worker)
4. service-worker.js (Caches files for offline use)
5. How to Test
localhost(e.g., withnpx http-serveror Live Server in VS Code).