Offline First Experiences On The Web

2019-07-10PWAs2 min read

Design research has revealed that our apps will be used in ways we can never imagine. Despite how much we attempt to simulate real-world user scenarios, there's only so little we could do.

Offline as a usecase

It's hard to think of scenarios that put your users offline. Why would they be offline? Isn't this the internet?

But there's a thin line between been connected and not. While you can assume your most typical user is on 4G, that's hardly true 100% of the time.

They could venture into offline spaces like the train or the plane. They might be on flight mode, run out of data or even visit from the next billion regions where internet connection is a huge chunk of their salaries.

Offline first users

Users in fully developed countries could be always connected to the internet. This is largely different for people in developing countries.

They are mostly offline and turn on their data connection intermittently. While they know most apps require them to be connected to the internet, having one that works offline or on a bad network could make a huge difference.

Offline-first as progressive enhancement

Giving an increasingly delightful experience as the user's ability increases is the heart of progressive enhancement.

If a person is offline, they're currently not able to use your product (a little disabled). Instead of letting the browser display the deadly dinosaur, they should still be able to do basic things on the app while they wait to be re-connected.

Offline experiences are possible only through modern browser APIs like cacheStorage and Service Workers.

CacheStorage is an API for declaratively storing resources on the user's browser and retrieving them without going to the network.

A Service Worker is a JavaScript file that provides an interface to interact with the user's browser even while they've left our pages or are disconnected from the internet.

Thanks for reading😊.