Overview
Explore a gripping tale of technological disaster in this JSConf EU 2017 conference talk. Delve into the catastrophic consequences of a simple typo that led to the outbreak of zombie ServiceWorkers, infecting tens of thousands. Learn about the intricacies of Service Workers, including AsyncAwait and AsyncGenerator concepts. Discover crucial strategies to prevent similar incidents, such as proper registration practices, dependency management, and smart caching techniques. Gain insights on avoiding forced activation, maintaining consistent file names, and setting appropriate cache headers. Understand the importance of invalidation, feature flags, and kill switches in managing Service Worker deployments. Master the art of effective testing, including unit tests and specialized Service Worker test recipes. Conclude with valuable lessons on responsible development practices in the age of ServiceWorker technology.
Syllabus
Introduction
A horror story
What is a Service Worker
AsyncAwait
AsyncGenerator
Dont Register
Know your dependencies
Cache smarter
Avoid forcing activation
Never rename the Service Worker file
Set correct cache headers
Invalidation
FeatureFlagKillSwitch
Dont Cache
Guard Against Missing API
Test Your Service Worker
SWTestEnd
UnitTest
Recipe
Mystery
Conclusion
Taught by
JSConf