Maximiliano Firtman wrote Service Workers replacing AppCache: a sledgehammer to crack a nut where he makes a case for Service Workers not being ready to replace AppCache, regardless of how broken it is. I happen to disagree with it for the same reasons Jake Archibald listed in Application Cache is a Douchebag and for reasons… Read More

General Resources and Concepts Is ServiceWorker Ready Service Workers Sepcification at W3C Instant Loading Web Apps with An Application Shell Architecture Examples and tutorials Jake Archibald Offline Cookbook Simple Service Worker tutorial Making A Service Worker: A Case Study Smashing Magazine Article Accompanying code The Guardian Building an offline page for Jeremy Keith’s Example… Read More

Building a ServiceWorker using Google libraries Google provides an abstraction layer over Service Workers called sw-toolbox that hides a lot of the complexities of a Service Worker without sacrificing functionality. The example below uses sw-toolbox to create a serviceworker that precaches the application shell and treats everything else as a default with a network-first  strategy.… Read More

Caching strategies: what, how, when Jake Archibald’s Offlline Cookbook outlines several strategies to use Service Workers. The two most common ones are cache-first and network-first. In a cache-first situation we check the cache for the resource we requested and if it’s not in the cache then we fetch it from the network. This works on… Read More

The first way to build a ServiceWorker is to manually write Javascript to accomplish the task. We’ll look at the basics of a service worker and different strategies to cache the content basd on our needs. Before we get started there are some things to consider: This is an enhancement Reliable network access is something… Read More