BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Experimental Web Install API Seeks to Improve Application Discovery and Distribution

Experimental Web Install API Seeks to Improve Application Discovery and Distribution

Listen to this article -  0:00

The new, experimental Web Install API is now in Origin Trial in Microsoft Edge and Chrome. The API allows developers to programmatically trigger a PWA installation prompt from in-app user interactions. The API aims to simplify software discovery and distribution, particularly for users who are unaware of the install icon in the browser’s address bar or do not typically use app stores.

The official explainer document from Microsoft Edge’s team details the motivation behind the new API:

End users don’t have a standard, cross-platform way to acquire applications. Users are usually faced with inconsistent, hidden, and proprietary mechanisms (custom protocols, stores) to acquire applications.

The Web Install API aims to fix this issue by creating an open, ergonomic, standardized, and cross-platform supported way of acquiring applications.

The proposal author is Diego Gonzalez from the Microsoft Edge browser team. This is in line with past Microsoft advocacy for Progressive Web Apps (cf. PWABuilder) and contrasts with Apple, which has historically lagged in its support for PWAs on iOS, sometimes implementing serious limitations, a situation that led in the past to scrutiny from the EU.

The Web Install API introduces a new navigator.install() method which returns a promise that resolves with a manifest_id when the app installation is completed, or errors when the user rejected the app installation (AbortError) or no manifest could be found (DataError). The promise is also rejected if the installation is triggered in incognito or private mode.

The Install API is intended to replace or augment the existing beforeinstallprompt event and enables PWAs to be distributed through direct installation links.

Diego Gonzalez signaled cross-vendor interest in evolving the proposal on the standard path and providing implementations:

In scope of the W3C WebApps WG, Firefox, Safari, and Chromium agreed to work on ‘current document’ installation. There’s discussion on a declarative way of enabling this as well, so there is cross-vendor progress. But yes, the last word is on each implementor.
[…] Now. this means to start we’d only get ability to install the same page you’re browsing, but the cross-site install is something that continues discussion on WICG.

The API is still in its early stages. with changes in specifications expected (e.g., cross-site application installation). Developers interested in testing it and providing feedback can upgrade their Chrome or Edge browser to version > 143. For older versions (139-142), developers can enable it through about:flags in Chrome and Edge or by participating in the origin trial for Microsoft Edge. Other browsers (e.g., Safari, Firefox) currently ignore navigator.install and default to their existing Add to Home Screen / Install App experiences.

About the Author

Rate this Article

Adoption
Style

BT