While web applications have been available for mobile devices from the start, they have generally been slower, have had fewer features, and been less used than native apps. But with the ability to work offline, previously only available to native apps, PWAs running on mobile devices can perform much faster and provide more features, closing the gap with native apps, in addition to being portable across both desktop and mobile platforms.
PWAs do not require separate bundling or distribution. Publication of a progressive web app is as it would be for any other web page. PWAs work in any browser, but "app-like" features such as being independent of connectivity, install to home screen, and push messaging depend on browser support. As of April 2018, those features are supported to varying degrees by the Microsoft Edge, Google Chrome, Mozilla Firefox, and Apple Safari browsers, but more browsers may support the features needed in the future. Several businesses highlight significant improvements in a wide variety of key performance indicators after PWA implementation, like increased time spent on page, conversions, or revenue.
At the launch of the iPhone in 2007, Steve Jobs announced that web apps, developed in HTML5 using AJAX architecture, would be the standard format for iPhone apps. No software development kit (SDK) was required, and the apps would be fully integrated into the device through the Safari browser engine. This model was later switched for the App Store, as a means of preventing jailbreakers and of appeasing frustrated developers. In October 2007 Jobs announced that an SDK would be launched the following year. As a result, although Apple continued to support webapps, the vast majority of iOS applications shifted towards the App Store.
Firefox released Firefox OS in 2013. It was intended to be an open-source operating system for running webapps as native apps on mobile devices, with Gaia built as its HTML5 interface. The development of Firefox OS ended in 2016.
In 2015, designer Frances Berriman and Google Chrome engineer Alex Russell coined the term "progressive web apps" to describe apps taking advantage of new features supported by modern browsers, including service workers and web app manifests, that let users upgrade web apps to progressive web applications in their native operating system (OS). Google then put significant efforts into promoting PWA development for Android. With Apple's introduction of service worker support for Safari in 2017, PWAs were now supported on the two most commonly-used mobile operating systems, Android and iOS.
Progressive web apps are designed to work on any browser that is compliant with web standards. As with other cross-platform solutions, the goal is to help developers build cross-platform apps more easily than they would with native apps. According to Google Developers, the characteristics of a PWA are:
The technical baseline criteria for a site to be considered a progressive web app by browsers were described by Russell in a follow-up post:
Some progressive web apps use an architectural approach called the App Shell Model. In this model, service workers store the Basic User Interface or "shell" of the responsive web design web application in the browser's offline cache. This model allows for PWAs to maintain native-like use with or without web connectivity. This can improve loading time, by providing an initial static frame, a layout or architecture into which content can be loaded progressively as well as dynamically.
The web app manifest is a W3C specification defining a JSON-based manifest (usually labelled manifest.json) to provide developers a centralized place to put metadata associated with a web application including:
This metadata is crucial for an app to be added to a home screen or otherwise listed alongside native apps.
iOS Safari does not implement manifests, but most of the PWA metadata can be defined via Apple-specific extensions to the meta tags. These tags allow developers to enable full-screen display, define icons and splash screens, and specify a name for the application. The APIs for new technologies also lagged behind Google's Android WebView implementation, although iOS 12.2 and 13 has caught up somewhat.
Service workers go through a three-step lifecycle of Registration, Installation and Activation. Registration involves telling the browser the location of the service worker in preparation for installation. Installation occurs when there is no service worker installed in the browser for the webapp, or if there is an update to the service worker. Activation occurs when all of the PWAs pages are closed, so that there is no conflict between the previous version and the updated one. The lifecycle also helps maintain consistency when switching among versions of service worker since only a single service worker can be active for a domain.
Technically, service workers provide a scriptable network proxy in the web browser to manage the web/HTTP requests programmatically. The service workers lie between the network and device to supply the content. They are capable of using the cache mechanisms efficiently and allow error-free behavior during offline periods.
Web Storage is a W3C standard API that enables key-value storage in modern browsers. The API consists of two objects, sessionStorage (that enables session-only storage that gets wiped upon browser session end) and localStorage (that enables storage that persists across sessions).
Indexed Database API is a W3C standard API for interacting with a NoSQL database. The API is supported by modern browsers and enables storage of JSON objects and any structures representable as a string. It is most commonly used with the idb wrapper around it.
Some other database libraries that can be used with PWAs include:
Application Cache (or AppCache or HTML5 cache manifest) is an earlier technology that allowed the application to cache content in advance for later use when the device is offline. It works adequately for single-page applications which it was designed for, but fails in problematic ways for multi-page applications like wikis. As of May 2019, the technology is supported by major browsers and in use for years by some sites, but it is already deprecated in favor of service workers and will eventually be removed.