Overview
The prompt to install a web app lets users add your app to their homescreen. Users that add apps to homescreens engage those apps more.
For example, shortly after launching this feature, Twitter reported an average of 250K unique daily users launching their Twitter Lite progressive web app 4 times a day from the homescreen. See Increasing engagement with "Add to Homescreen" prompt and web push notifications for more on Twitter's case study.
Recommendations
In order for a user to be able to install your Progressive Web App, it needs to meet the following criteria:
-
The web app is not already installed.
-
and
prefer_related_applications
is nottrue
.
-
and
- Meets a user engagement heuristic (previously, the user had to interact with the domain for at least 30 seconds, this is not a requirement anymore)
-
Includes a
web app manifest that includes:
-
short_name
orname
-
icons
must include a 192px and a 512px sized icons -
start_url
-
display
must be one of:fullscreen
,standalone
, orminimal-ui
-
- Served over HTTPS (required for service workers)
-
Has registered a
service worker with a
fetch
event handler
When these criteria are met, will fire a beforeinstallprompt
event that you can use to prompt the user to install your Progressive Web App,
and may show a
mini-info bar.
See Listen
for beforeinstallprompt
.
beforeinstallprompt
event. Check their
respective sites for full details:
Edge,
Firefox,
Opera,
Samsung Internet, and
UC Browser.
In addition, the scope of the service worker includes the page you audited
and the page specified in the start_url
property of the web app manifest. See
add to home screen to learn more.