PWA patterns for window and service worker communication
summary
Explains concrete patterns: use postMessage plus BroadcastChannel (not yet in Safari) to broadcast updates, use the Clients API to message the Last Focused tab or iterate all clients, or establish a dedicated two‑way pipe with MessageChannel. Shows real apps: 1-800-Flowers prefetches the top 10 product JSONs via service worker; Squoosh runs two web workers to parallelize image optimizations; Proxx offloads game state; Tinder surfaces an “update” button when a new service worker activates; podcasts and background fetch keep large downloads alive off the main thread.
AI-written summary · about
chapters (6)
- 0:00Intro
- 6:18Communication with web workers
- 13:50Window to Service Worker
- 14:24PostMessage API
- 15:15PostMessage Example
- 17:08Service Worker to Window Communication
related talks
42mService Worker: Taking the Best From the Past Experience for The Bright Future of PWAs
09mAdvanced PWA patterns
22mService Workers and Their Role in PWAs
28mThe App-Changing Magic (and Joy) of Web APIs
29mPWA, Hidden Stories about future of the Web - II
36mPWA underhood: what makes it so progressive
38mThe Mysterious Life of Web Apps in the Background
44mPWA - Welcome to the Future
