-
Notifications
You must be signed in to change notification settings - Fork 247
Description
Non-goals
- Replace
beforeinstallprompt
or associated behaviour (this is the way to install from the same-domain).- Change the way the UA currently prompts for installation of a PWA.
- As a developer, I want to have a single unified API for both installing web app(s) from another domain as well as from the same domain. So,
navigator.install()
should completely replace thebeforeinstallprompt
API.
The beforeinstallprompt
API is very poorly designed and has bad DX (developers should listen and catch the event, etc.). I know that @firtman and @b1tr0t agree with that.
Currently, the beforeinstallprompt
is implemented only in some Chromium-based browsers (primarily desktop). E.g. on Android it works only in Chrome. In other third-party Android browsers, it is either not implemented at all or the beforeinstallprompt
event never fires, despite feature detection reporting it to be supported (e.g. see the Meta Quest Browser case).
(This is partly due to the fact that third-party browsers on Android don't have access to the WebAPK minting server (see https://crbug.com/1243583). So these browsers can't provide the same level of UX as Chrome, i.e. deeper integration with the OS: app icon shortcuts, share targets, etc. None of this is possible without packaging PWA into an APK. That's why these browsers don't promote PWA installation.)
In the other non-Chromium browsers (Firefox, Safari) the beforeinstallprompt
is not implemented at all. Moreover, the consensus on beforeinstallprompt
and prompt()
was not reached (see mozilla/standards-positions#84). So, it's not a part of web standard.
This means that we should think about the design of a new API without fear of breaking the web (backwards compatibility), without looking back at poor beforeinstallprompt
API technical/architectural decisions. Moreover, we should try again and give the new Web Install API a chance to reach consensus and finally become a web standard and thus replace the beforeinstallprompt
API.
- PWA install prompt should be a permission request just like any other permission request to access camera, microphone, geolocation or display push notifications. Think of it as "permission request to install web app(s) on the device".
This solves many problems. It fits perfectly with the idea of a system based on a user's likelihood to actually need or want one.
In this case any heuristics, policies and ideas for other permission requests could be applied to install permission too! E.g. automatic permission request blocking with backoff ("embargo") (see https://crbug..com/679877). Or Quieter permission UI for notifications. Or Time-limited Permissions.
It also solves the problem that currently the end user has no browser-level toggle to disable PWA install promotions. This is a very requested feature, by the way! PWA criteria/requirements was relaxed. The valid web app manifest is enough. What happens in the future when every second or even first website is PWA? And the end user has no browser-level toggle to disable these promotions.
See the attached image: