History of Offline Web Applications

This post describes the chronology of key events, from HTML5 Working Draft till Progressive Web Apps, that impacted on development of online web applications, that can work offline.

The Reasons

User cannot continue working with online applications without connection (he cannot read emails, see calendar and working on presentations without connection. At the same time, desktop application allows user to do it (read emails from cache, see calendar events from cache).

In case of losing the connection, web-applications depend on HTTP Cache, because those applications cannot ask for a new data.

HTML5 Working Draft — 22 January 2008

At the January 2008, the world saw the HTML5 Working Draft that contains description of Offline Web applications. It describes cache of application and special file called manifest, that contains all rules required for caching application resources. In the document there are also descriptions of events that browser should fire in case of losing or getting internet connection.

W3C Working Group Note — 30 May 2008

Note published 30th of March 2008 adds more information about resource caching and also gives information about client-size SQL storage.

Hybrid Web Applications — 2008–2009

In 2008 the world meets hybrid web-applications. These application represent native shell that implemented on each platform and bunch of frontend resources. Developer needs to write only client-size resources and those will be packed into native shell, that was provided by framework. Missing features were implemented by native code for each platform and their APIs are accessible from JavaScript for developers.

Hybrid applications still work and popular.

Open Web App by Firefox — 2010

In 2010 Firefox starts working on Open Web App — first attempt for creating tools and practices for developing and delivering web applications, that works offline.

Open Web Apps could be installed locally on device, they have access to local storage and they also have access to API of device if privileged was granted.

Firefox Web Runtime — 2012

In 2012 Firefox Web Runtime Project was published. It allows users to install Open Web Apps on Windows, Mac, Android and Linux.

Applications was two types: hosted and packaged apps. Packaged application in an achive, that contains manifest file and all needed resources. Hosted app was just an website with manifest. While opening a website with Firefox browser, a special native banner with button to install the app is appear to user. The difference between hosted app and packaged that first one automatically updates when website was updated, but packaged apps usually have more priveleges for using device APIs. Also users were able to download the applications right from Firefox Marketplace, analogue of Google Play for Firefox applications.

In 2015 Web Runtime was closed.

Manifest for web apps and bookmarks — 17 December 2013

In December 2013 W3C First Public Working Draft Manifest for web apps and bookmarks was published. This document contains description of manifest file. Now, it is json-structured file with application name, description, icons and etc. As you see, there are no caching rules in manifest.

Progressive Web App — 15 June 2015

Alex Russell, software-developer at Google gave description of Progressive Web App — web application, that could be installed on device from browser and such type of application also has access to native features of device.

Differences and major parts of Progressive Web App:

Service Worker (see more Service Workers: an Introduction) — script, that runs in separated context from browser window, that responsible for handling background jobs, resource caching and can also handle push-notifications.

Also, browser will show the user a native banner to install an application, but a few rules must be followed:

  • Manifest file must exist and contains least required amount of information
  • An app must work over HTTPS
  • An app must contain Service Worker
  • User must visit the app twice, but with at least 5 minutes between visits.

The last rule is the most interesting. User won’t be bored by popups if he visits random websites. So, it gives more chance that Progressive Web Apps would be installed on user devices.