Slack

Service Workers at Slack: Our Quest for Faster Boot Times and Offline Support

Aug 29, 2019
Service Workers at Slack: Our Quest for Faster Boot Times and Offline Support
SummaryAI, from the source post

This post details the technical implementation and benefits of using Service Workers at Slack to achieve faster boot times and offline support. It explains what Service Workers are, how they are used to cache assets (HTML, JS, CSS, fonts, sounds) and persisted Redux store data (to IndexedDB), and the distinction between cold and warm boots. The post covers the Service Worker lifecycle (install, fetch, activate), cache management using the Cache API keyed by deploy time, and strategies for handling the 'one version behind' issue with a jittered registration interval. It also touches on caching API responses to keep features in sync with assets and highlights the resulting ~50% reduction in boot time over the legacy client and ~25% improvement in warm over cold boots.

More from the Frontend Framework for Fast Booting trail