The Mysterious Life of Web Apps in the Background
summary
A test site uses WebSockets, requestAnimationFrame, CSS animations, setInterval, a Web Worker and a Service Worker to record what actually runs when pages hide: rAF and CSS animations stop; main-thread timers throttle to about 1s on desktop and 10s in Safari, 500ms throttling on iOS/iPadOS; Chromium-based PWAs get up to 5 minute worker/service-worker execution, Firefox stops pages immediately (service worker ~30s). Covers Page Visibility API, Page Lifecycle freeze/resume, Clients API and polyfills plus strategies to save/restore state.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 1:21Why background behavior matters
- 2:24Spying on background apps
- 6:37Desktop background behavior
- 8:00iOS background behavior
- 11:14Android background behavior
- 16:50Timer throttling summary
- 19:21Detecting background state
- 22:34Executing code in background
- 25:41Key takeaways
- 26:08Q&A
related talks
01h 13mWeb: The good parts
25mDemystifying Web Workers and Service Workers
43mService workers
45mThe (Awesome) Future of Web Apps
28mThe App-Changing Magic (and Joy) of Web APIs
51mAMP, PWAs, HTTP/2 and Service Workers: A New Era of Web Performance?
01h 03mSpeed up your Web Application
24mPWA for Mobile Engineers
