Going offline
summary
Claims that service workers + Cache API let regular sites behave like apps: HTTPS site registers navigator.serviceWorker.register('/serviceworker.js'), installs and pre-caches with caches.open('files').then(...).addAll([...]), intercepts fetch events with event.respondWith(...caches.match(...) || fetch(...)) and supports strategies: cache-first, network-first with cache-as-you-go, or a saved-for-offline button. Demos (resilientwebdesign.com, adactio.com) actually work offline in airplane mode and the cached book fits comfortably in browser storage.
AI-written summary · about
chapters (8)
- 0:00Start
- 18:47register
- 25:07precaching When this service worker is installing
- 29:19active
- 29:50cache first When a file is requested
- 36:03network first
- 39:52cache as you go
- 41:48custom offline page
related talks
23mGo Offline with Service Workers
44mOffline first!
27mMaking Offline Suck Less with Service Workers
05mLightning talk: Service Workers, use them
39mOffline first!
28mOut of the Shadows
01h 00mService Worker: Bringing Native App Experience to Web Apps
44mDesign principles and implementation strategies for better offline experience
