Making the web work offline

Jan Jongboom, Umesh Telang and Jake Archibald explore the difficulties and possible solutions to making the web work offline

Jan Jongboom, Telenor Digital, explains that web developers have always tended to treat offline as a second class citizen.

There’s a definite tension between caching and personalisation, says Umesh Telang, principal engineer BBC Platform Services. The more personalised the content the harder it is to cache. If everyone is served the same content it’s easier to cache.

Jake Archibald, Google Chrome, tells us that when his team see native apps being built (for platforms such as iOS, Android, Microsoft) they can’t help but think, "Why didn’t they build it for the web, as it only involves one build?" Developers want to be able to work offline. When a user selects the Twitter or G+ app they appear straight away, but the data they display isn’t fresh. The web can’t do this yet; the user has to wait for the connection to go through the internet.  Google wants to take this away and tell the web to update content in the background, so that when users arrive at the site they see the content it has to offer straight away and only then does it make a live connection for data.

"The solution is to build a hybrid application where developers combine caching and online content" - Jan Jongboom

Jan continues that the benefit of the web is that URLs can be linked to - there is no need to install an application and new content is available to everyone without having to manually update. Ultimately app content is highly volatile and thus changes are cheap.

Jake, along with his colleagues at Google Chrome, is developing a specification called the Service Worker.  It’s a low-level specification to allow developers to judge, on a connection by connection basis, whether or not they need to go to the internet or not.  

Jan explains that it gives developers fine grain control, because they are in charge of what gets cached, when it gets updated, when it invalidates and specific rules can be added too.