0
votes

Docs about heuristics of displaying Web App Install Banner only describes this conditions

  • Has a web app manifest file with:
    • a short_name (used on the home screen)
    • a name (used in the banner)
    • a 144x144 png icon (the icon declarations must include a mime type of image/png)
    • a start_url that loads
  • Has a service worker registered on your site.
  • Is served over HTTPS (a requirement for using service worker).
  • Is visited at least twice, with at least five minutes between visits.

enter image description here

But what happen when user dismiss Web App Install Banner (for example by accident)?

I'm trying to find out this question:

  1. Will browser in the future use the same heuristic as I pointed above to show Web App Install Banner once again? Or it will use different heuristic? Or it will never be show in the future?
  2. Can you use some API to manually invoke Web App Install Banner? (something like deferred prompt in this example)
2
The page you linked to is a bug that was used when developing the web app install banner -- it is not documentation! - user149341
@duskwuff It wasn't super important in this question but I updated this link. - Everettss
It's mostly a matter of making sure other people don't think that bug is documentation either. - user149341

2 Answers

1
votes

From what I know (and tested), the moment the user has dismissed, accidentally dismissed or just ignored the banner, it is considered a "Cancelled to add to homescreen." Unfortunately also, Google has not allowed the developers to trigger the banner at any time.

In addition to that, the requirements that you have mentioned are outdated. You might want to check out the PWA checklist

0
votes

According to Chrome dev: "If dismissed by a user, it will not be shown until a sufficient period of time (~3 months) has passed."

Taken from here: https://developers.google.com/web/updates/2018/06/a2hs-updates