MSEdgeExplainers icon indicating copy to clipboard operation
MSEdgeExplainers copied to clipboard

[Web Install] Alternate solution: Standardize a declarative install banner

Open dfabulich opened this issue 11 months ago • 3 comments

I'm frankly skeptical that Mozilla and Apple will approve of an imperative navigator.install() API, but I think it's much more likely that Mozilla and Apple would approve of a declarative install banner.

For example, today, Apple has a feature for native apps called the Smart App Banner.

https://developer.apple.com/documentation/webkit/promoting_apps_with_smart_app_banners

Smart App Banners vastly improve users’ browsing experience compared to other promotional methods. In iOS, Smart App Banners provide a consistent look and feel that users come to recognize. They trust that tapping the banner will take them to the App Store and not a third-party advertisement. They appreciate unobtrusive banners at the top of a webpage, instead of a full screen that interrupts their experience with the web content. And with a large and prominent Close button, a banner is easy to dismiss. When the user returns to the webpage, the banner doesn’t reappear.

You activate a Smart App Banner with a meta tag, like this:

<meta name="apple-itunes-app" content="app-id=myAppStoreID, app-argument=myURL">

It would be useful to standardize a similar <meta> tag for PWA installation.

<meta name="install-prompt" content="appearance=banner, referral-info=foo-bar-string-data">

For the cross-domain use case:

<meta name="install-prompt" content="appearance=banner, remote-url=https://elk.zone, mode=side-panel">

Like the <a> tag, this approach limits the amount of information available to the developer. But that may be a good thing! That could be exactly what makes the major browser engines buy in.

dfabulich avatar Aug 01 '23 16:08 dfabulich