This content originally appeared on Adactio: Journal and was authored by Adactio: Journal
My bug report on Apple’s websites-in-the-dock feature on desktop has me thinking about how starkly different it is on mobile.
On iOS if you want to add a website to your home screen, good luck. The option is buried within the “share” menu.
First off, it makes no sense that adding something to your homescreen counts as sharing. Secondly, how is anybody supposed to know that unless they’re explicitly told.
It’s a similar situation on Android. In theory you can prompt the user to install a progressive web app using the botched BeforeInstallPromptEvent
. In practice it’s a mess. What it actually does is defer the installation prompt so you can offer it a more suitable time. But it only works if the browser was going to offer an installation prompt anyway.
When does Chrome on Android decide to offer the installation prompt? It’s a mix of required criteria—a web app manifest, some icons—and an algorithmic spell determined by the user’s engagement.
Other browser makers don’t agree with this arbitrary set of criteria. They quite rightly say that a user should be able to add any website to their home screen if they want to.
What we really need is an installation API: a way to programmatically invoke the add-to-homescreen flow.
Now, I know what you’re going to say. The security and UX implications would be dire. But this should obviously be like geolocation or notifications, only available in secure contexts and gated by user interaction.
Think of it like adding something to the clipboard: it’s something the user can do manually, but the API offers a way to do it programmatically without opening it up to abuse.
(I’d really love it if this API also had a declarative equivalent, much like I want button type="share"
for the Web Share API. How about button type="install"
?)
People expect this to already exist.
The beforeinstallprompt
flow is an absolute mess. Users deserve better.
This content originally appeared on Adactio: Journal and was authored by Adactio: Journal
Adactio: Journal | Sciencx (2024-06-12T15:33:40+00:00) Web App install API. Retrieved from https://www.scien.cx/2024/06/12/web-app-install-api/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.