Progressive web application
Since a progressive web app is a type of webpage or website known as a web application, they do not require separate bundling or distribution. Developers can just publish the web application online, ensure that it meets baseline "installability requirements", and users will be able to add the application to their home screen. Publishing the app to digital distribution systems like Apple App Store or Google Play is optional.
|Chromium-based||Yes||Yes||Yes||Yes||No||Includes Google Chrome, Microsoft Edge, Brave, Opera, Vivaldi, and others.|
At the launch of 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.
In 2013, Mozilla released Firefox OS. It was intended to be an open-source operating system for running webapps as native apps on mobile devices. Firefox OS was based on the Gecko rendering engine with a user interface called Gaia, written in HTML5. The development of Firefox OS ended in 2016, and the project was completely discontinued in 2017, although a fork of Firefox OS was used as the basis of KaiOS, a feature phone platform.
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. Firefox introduced support for service workers in 2016, and Microsoft Edge and Apple Safari followed in 2018, making service workers available on all major systems.
In December 2020, Firefox for desktop abandoned implementation of PWAs (specifically, removed the prototype "site-specific browser" configuration that had been available as an experimental feature). A Firefox architect noted: "The signal I hope we are sending is that PWA support is not coming to desktop Firefox anytime soon." Mozilla still plans to support PWAs on Android.
Since a progressive web app is a type of webpage or website known as a web application, they do not require separate bundling or distribution. In particular, there is no requirement for developers or users to install the web apps via digital distribution systems like Apple App Store, Google Play, Microsoft Store or Samsung Galaxy Store. To varying degrees, the major app stores support PWAs, allowing them to be found in app stores. Google Play, Microsoft Store, and Samsung Galaxy Store support PWAs, but Apple App Store does not. Microsoft Store publishes some qualifying PWAs automatically (without app authors' request) after discovering them via Bing indexing.
Progressive web apps are all designed to work on any browser that is compliant with the appropriate 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. Progressive web apps employ the progressive enhancement web development strategy.
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.
- Originate from a secure origin. Served over TLS and green padlock displays (no active mixed content). Progressive web apps must be served via HTTPS to ensure user privacy, security, and content authenticity.
- Register a service worker with a fetch handler. Progressive web apps must use service workers to create programmable content caches. Unlike regular HTTP web cache, which caches content after the first use and then relies on various heuristics to guess when content is no longer needed, programmable caches can explicitly prefetch content in advance before it's used for the first time and explicitly discard it when it is no longer needed. This requirement helps pages to be accessible offline or on low quality networks.
- Reference a web app manifest. The manifest must contain at least the five key properties:
display(with a value of
icons(with 192px and a 512px versions). Due to existence of manifest, PWAs can be easily shared via a URL, discovered by a search engine, and do not require complex installation (but can be listed in a third-party app store). Furthermore, PWAs support native app-style interactions and navigation, including being added to home screen, displaying splashscreens, etc.
Comparison with native apps
This section contains content that is written like an advertisement. (May 2021)
In 2017, Twitter released Twitter Lite, a PWA alternative to the official native Android and iOS apps. According to Twitter, Twitter Lite consumed only 1-3% of the size of the native apps. In July 2019 Twitter started serving all website users to Twitter Lite by default. On June 1, 2020, Twitter deactivated the legacy website layout, leaving the progressive web app version as the only option.
Starbucks provides a PWA that is 99.84% smaller than its equivalent iOS app. After deploying its PWA, Starbucks doubled the number of online orders, with desktop users ordering at about the same rate as mobile app users.
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.
There are many commonly used technologies to create progressive web apps. A web application is considered a PWA if it satisfies "installability criteria" and thus can work offline and can be added to device home screen. To meet this definition, all PWAs require at minimum a service worker and a manifest.
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:
- The name of the web application
- Links to the web app icons or image objects
- The preferred URL to launch or open the web app
- The web app configuration data
- Default orientation of the web app
- The option to set the display mode, e.g. full screen
This metadata is crucial for an app to be added to a home screen or otherwise listed alongside native apps.
iOS Safari partially implements manifests, while 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.
Progressive Web App execution contexts get unloaded whenever possible, so progressive web apps need to store majority of long-term internal state (user data, dynamically loaded application resources) in one of the following manners
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).
A service worker is a web worker that implements a programmable network proxy that can respond to web/HTTP requests of the main document. It is able to check the availability of a remote server and to cache content when that server is available, and serve that content later to the document. Service workers, like any other web workers, work separately from the main document context. Service workers can handle push notifications and synchronize data in the background, cache or retrieve resource requests, intercept network requests and receive centralized updates independently of the document that registered them, even when that document is not loaded.
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.
Indexed Database API
Indexed Database API is a W3C standard database API available in all major browsers. The API is supported by modern browsers and enables storage of JSON objects and any structures representable as a string. Indexed Database API can be used with a wrapper library providing additional constructs around it.
- HTML Application, an obsolete alternative from Microsoft
- Rich web application, another obsolete alternative
- "Progressive Web Apps | Software AG". techradar.softwareag.com. Retrieved 2020-09-25.
- "Can I use pwa?". CanIUse. Retrieved 27 January 2021.
- "Is Service Worker Ready?". Jake Archibald.
- Newman, Jared (2021-01-26). "Firefox just walked away from a key piece of the open web". Fast Company. Retrieved 2021-01-27.
- "Progressive Web Apps on Windows overview". Microsoft Edge Documentation. 13 March 2021. Retrieved 13 March 2021.
- "Get your PWA on". Vivaldi Browser. 2021-10-07. Retrieved 2021-10-11.
- Firtman, Maximiliano (2020-08-18). "Progressive Web Apps on iOS are here 🚀". Medium. Retrieved 2021-01-29.
- Ritchie, Rene (5 March 2018). "App Store Year Zero: Unsweet web apps drove iPhone to an SDK". iMore. Retrieved 23 May 2019.
- "Jobs' original vision for the iPhone: No third-party native apps". 9to5Mac. 21 October 2011. Retrieved 22 May 2019.
- Marcotte, Ethan. "Responsive Web Design". A List Apart. Retrieved May 25, 2010.
- Hoffman, Chris; PCWorld | (2016-09-28). "Mozilla is stopping all commercial development on Firefox OS". PCWorld. Retrieved 2021-03-17.
- "KaiOS, a feature phone platform built on the ashes of Firefox OS, adds Facebook, Twitter and Google apps". TechCrunch. Retrieved 2021-03-17.
- Russell, Alex. "Progressive Web Apps: Escaping Tabs Without Losing Our Soul". Retrieved June 15, 2015.
- Evans, Jonny (26 January 2018). "Apple goes back to the future with web apps". Computerworld. Retrieved 23 May 2019.
- Ladage, Aaron (17 April 2018). "Progressive Web Apps Are Here and They're Changing Everything". DEG. Retrieved 23 May 2019.
- "Can I use... Support tables for HTML5, CSS3, etc". caniuse.com. Retrieved 2021-05-16.
- LePage, Pete (4 June 2019). "Progressive Web Apps on Desktop". Google Developers. Retrieved 13 September 2019.
- agi90 (19 December 2020). "Comment". Reddit.
We have no plans of sunsetting PWAs on mobile that I know of.
- MSEdgeTeam. "Publish your Progressive Web App to the Microsoft Store - Microsoft Edge Development". docs.microsoft.com. Retrieved 2021-05-16.
- "The first batch of Windows 10 Progressive Web Apps is here". Windows Central. 2018-04-07. Retrieved 2021-05-16.
- "The App Shell Model".
- Osmani, Addi. "The App Shell Model | Web Fundamentals". Google Developers. Retrieved 23 May 2019.
- Russell, Alex. "What, Exactly, Makes a Progressive Web App". Retrieved October 18, 2016.
- "What does it take to be installable?". web.dev. Retrieved 2021-05-19.
- Google Developers. "Progressive Web App". Retrieved June 15, 2015.
- "Service worker caching and HTTP caching". web.dev. Retrieved 2021-05-19.
- W3C "Web App Manifest", Working Draft, retrieved 12 September 2016
- "Twitter Starts Rolling Out Updated Website With New Design". MacRumors.
- "Twitter warns of legacy site theme shutting down on June 1". BleepingComputer.
- "12 Best Examples of Progressive Web Apps (PWAs) in 2021". SimiCart. 2021-02-22. Retrieved 2021-05-16.
- "Discoverable". Mozilla Developer Network. Retrieved 2017-04-24.
- "Network independent". Mozilla Developer Network. Retrieved 2017-04-24.
- "Instant Loading Web Apps with an Application Shell Architecture". Google Developers. Retrieved 2017-04-24.
- "Web Manifest Docs on MDN". MDN Web Docs.
- "What's new on iOS 12.2 for Progressive Web Apps". Medium. 27 March 2019.
- "Configuring Web Applications". Safari Web Content Guide.
- "WebAssembly Concepts". MDN. Retrieved 14 August 2018.
- "Web Storage API". MDN. Retrieved 14 August 2018.
- "Introduction to Service Worker | Web". Google Developers. 1 May 2019. Retrieved 23 May 2019.
- "Concepts behind IndexedDB". MDN. Retrieved 14 August 2018.