I stumbled upon this site the other day from Mozilla that’s a collection of recipes to get started with a Service Worker — from caching strategies and notifications to providing an offline fallback to your users, this little cookbook has it all.
This two-part series is a gentle introduction to offline web development. Getting a web application to do something while offline is surprisingly tricky, requiring a lot of things to be in place and functioning correctly. We're going to cover all of these pieces from a high level, with working examples. This post is an overview, but there are plenty of more-detailed resources listed throughout.
A straightforward tutorial by Una Kravets on caching assets and individually requested articles with Service Workers for offline reading.
I'm curious what the best practice will become. It's possible that asking users to click something is it. Also possible: passively caching articles based on recently published, currently viewing, or related to currently viewing.
Also, if you're interested in hearing more about this "Progressive Web Apps" stuff and the debate around it...
Remy Sharp attended Google's first Progressive Web Apps event:
I’ve been playing around with ServiceWorker a lot recently, so when Chris asked me to write an article about it I couldn’t have been more thrilled. ServiceWorker is the most impactful modern web technology since Ajax. It’s an API that lives inside the browser and sits between your web pages and your application servers. Once installed and activated, a ServiceWorker can programmatically determine how to respond to requests for resources from your origin, even when the browser is offline. ServiceWorker can be used to power the so-called "Offline First" web.
ServiceWorker is a progressive technology, and in this article, I'll show you how to take a website and make it available offline for humans who are using a modern browser while leaving humans with unsupported browsers unaffected.