service workers

We built a PWA from scratch – This is what we learned

I hadn't considered the fact that if you're fingerprinting your assets (e.g. style.987987090897.css) to take advantage of browser cache, you'll need to update your Service Worker every time you do that. But I guess you've got a build step anyway, so it can be updated in both places:

... we used a NodeJS module called Stacify to automatically create new version numbers in all the places when a file is changed.

Implementing “Save For Offline” with Service Workers

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.

Making a Simple Site Work Offline with ServiceWorker

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.

(more…)

icon-anchoricon-closeicon-emailicon-linkicon-logo-staricon-menuicon-nav-guideicon-searchicon-staricon-tag