
为什么苹果不希望 Web 应用可安装
来源标题:Why Apple Doesn't Want Web Apps to Be Installable
你可以构建一个功能完善的 Web 应用:它能离线工作、发送通知、访问设备硬件,行为表现几乎与原生应用无异。然而在 iPhone 上,你仍然需要让用户在繁琐步骤中折腾才能把它安装到主屏幕,前提是他们甚至能发现这个操作方法。苹果称希望 Web 应用安装成为用户深思熟虑、知情的选择。但它反对由开发者提供的安装控件(包括新的 <install> 元素),这令人质疑其政策究竟是真正保护用户,还是只是让 Web 应用更难被发现和安装。在 iOS 上安装原生应用很简单:打开 App Store、找到应用、点击下载按钮即可加到主屏幕。而(渐进式)Web 应用却并非如此。在最新版 iOS 上,你需要点击地址栏左侧的菜单,点击“分享”,点击“显示更多”,再向下滚动找到“添加到主屏幕”选项。试着向那些连收藏网页都不太会的非技术用户解释这套流程吧……Web 应用的安装选项竟埋在一个毫不相关的分享菜单里的第四层深处
以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。
You can build a sophisticated web app that works offline, sends notifications, accesses device hardware, and behaves much like a native app. Yet on an iPhone, you still need to make your users jump through hoops to install it to their Home Screen, that is, if they can even find out how.
Apple says it wants web app installation to be a deliberate, informed decision by the user. But its opposition to developer-provided installation controls, including the new <install> element, raises questions about whether its policies actually protect users or simply make web apps harder to discover and install.
It’s easy to install a native app on iOS. Just go to the App Store, find the app you want, tap the Download button, and the app is added to your Home Screen.
For (progressive) web apps, this is unfortunately not the case.
On the latest iOS, you need to tap the menu in the left corner of the address bar, tap Share, then tap Show more, and then scroll down to find the Add to Home Screen option. Try to explain this to non-tech-savvy users who barely know how to bookmark a website…
The fact that the installation option for a web app is buried four levels deep in an unrelated share menu is the main reason many users don’t even know web apps can be installed to their Home Screen in the first place. It’s one of the main hurdles to widespread adoption of PWAs (Progressive Web Apps).
Contrast this with Android, where web apps can have a native installation bottom sheet that provides one-click installation:
Android native installation bottom sheet
On iOS, the best we can currently do is provide a bottom sheet with installation instructions:
Bottom sheet with app-provided installation instructions on iOS 27
So while it is possible to install web apps to the Home Screen on iOS, it’s needlessly complex. But why is that?
If users can decide whether to install a web app, why shouldn’t they be able to do that by simply clicking an Install button?
Apple has long been accused of sabotaging the installation of web apps to protect their App Store monopoly. I’ve done so extensively myself.
However, the WebKit team has raised valid concerns over the beforeinstallprompt specifically that deserve a closer look, but let’s first examine how we got here.
Add to Home Screen was originally a way of saving websites for convenient access, and this eventually evolved into the standalone web apps we now know as PWAs.
Chromium then introduced the beforeinstallprompt that fires when a web app meets its installability criteria and results in an installation dialog being displayed. This event was never standardised, and WebKit opposed it, arguing that installation should be initiated by the user through browser UI rather than a website-generated request.
This is their main argument for opposing the beforeinstallprompt event, and personally, I think it makes sense, even if I don’t agree with it. What I do have a problem with is that WebKit also opposes the declarative <install> element that was specifically designed to address many of the objections WebKit raised.
This <install> element is a newer proposal that lets the browser render a trusted installation button inside a web app, with safeguards against abuse. But WebKit still opposes it, citing 5 main reasons for this.
From its statements over time, we can draw five recurring objections.
WebKit argues that installation should be something users explicitly choose, not something web apps persuade them to do. A user discovering Add to Home Screen in the browser’s menu allegedly demonstrates a stronger user intent than someone accepting an installation prompt.
You could argue that it’s clearer users really want to install a web app when they find and tap the browser menu item than when they confirm it through a dialog that automatically appears. But WebKit doesn’t provide any evidence that this is the case, so at this point it’s still an assumption.
WebKit is also opposed to the <install> element, which is a clearly labeled button and clicking it indicates an intentional user action.
The user must explicitly interact with a browser-rendered control. Why is that indication of intent insufficient?
WebKit argues that web apps could constantly nag users, display misleading prompts, or hijack clicks on other buttons to trigger installation requests.
This is a legitimate concern with imperative APIs like beforeinstallprompt but even then it doesn’t allow silent installation; the user still needs to confirm. Browsers can also implement protections against repeated prompts and misleading interactions.
The <install> element already implements several protections against abuse. It can’t be activated if the element is not fully visible to the user, and styling with CSS is limited. For example, it can’t be made fully transparent, the text can’t be made invisible, and the browser won’t allow styling that renders insufficient contrast.
What is particularly interesting is that Apple does allow native app promotion in Safari through Smart App Banners. It’s questionable that WebKit allows developer-driven native app promotion but considers similar PWA promotion harmful.
WebKit argues that installation deserves special protection because it gives web apps extra capabilities like receiving push notifications, app badging, and persistent storage. Their concern is that web apps could pressure users into installing to access these capabilities.
Installing a web app doesn’t automatically grant it permission to use these capabilities. Users still need to grant permission to use them, so installation and granting permission are separate decisions.
While the concern is valid, it should be enough to clearly inform users before they give consent to install the web app. There’s no need to make installation unnecessarily difficult, as is currently the case on iOS.
WebKit argues that installation is a browser and operating-system responsibility, so web apps shouldn’t control when installation is offered.
Offering to install a web app is different from controlling how it will be installed. The browser can still control the installation flow, regardless of whether the user clicked a button in the web app or an option in the browser’s menu.
Developers can make an informed decision when installation would be useful and display a button in that case. The browser can then still determine how it looks, whether it can be activated, and how the flow will be handled.
Burying it several levels deep in some browser menu only creates a discoverability problem. Safari claims to support making web apps installable but resists to standardize making installation discoverable.
WebKit argues that installation APIs can introduce confusing behavior and depend on browser-specific definitions of installability. Safari doesn’t automatically prompt users or require specific PWA technologies for installation.
These concerns only apply to the original beforeinstallprompt design. The new <install> element doesn’t rely on intercepting automatic browser prompts and is not dependent on installability criteria before it can be activated.
Also, browser differences are common in web-platform API design and shouldn’t in itself be a reason to oppose certain APIs.
WebKit has questioned whether the low engagement with browser installation controls really indicates a discoverability problem. Maybe users simply don’t want to install web apps.
Chrome’s own experiments showed that its address-bar installation icon had a click-through rate of just 0.01%, while browser-initiated installation prompts achieved around 1.2%. For clarity, that’s 120x more.
While at first glance, those numbers seem to support WebKit’s argument, they measure engagement with installation controls, not actual interest in installed web apps.
In September 2026, Chrome engineer Dan Murphy shared some interesting internal Chrome figures: approximately 7% of Chrome users actively use installed PWAs over a seven-day period.
That’s hundreds of millions of PWA users.
On desktop, installed PWAs account for approximately 5% of user time with a standalone window open, and around 2% with a PWA in the foreground.
These figures don’t necessarily prove that better discoverability of installation controls would lead to higher adoption of PWAs, but they certainly challenge the idea that users simply don’t want installed web apps.
Murphy also argued that developers can better determine when installation would be useful. Low engagement might just mean browsers are offering installation in the wrong place, at the wrong time, or not making it clear enough why users should install the web app.
Rather than having browsers guess the right moment to offer installation, developers can offer it when it makes sense in their web apps. And that’s an important distinction.
Supporting <install> doesn’t mean browsers will automatically nag users with installation prompts. It simply gives developers a standardized way to offer installation while leaving the decision to the user.
In addition to their often flawed reasoning to oppose standardizing web app installation, Apple’s own installation model is inconsistent, to say the least.
Apple introduced Add to Dock in macOS Sonoma in 2023, allowing users to turn any webpage into a standalone web app. Safari 26 extended this approach to Home Screen web apps on iOS and iPadOS. Apple explicitly states that there are now zero installability requirements in Safari.
This doesn’t necessarily contradict WebKit’s position, because it’s fundamentally about who initiates installation, not which websites qualify for installation. But it raises an important question: if Safari trusts users to decide that any webpage deserves a place on their device, why doesn’t it also trust them to make that decision after explicitly clicking a protected Install button within the webpage?
Apple’s objections to website-initiated installation become particularly difficult to reconcile with a feature Safari has supported for years: Smart App Banners.
By adding a simple meta tag, developers can place a banner in Safari that encourages users to install their native app from the App Store. I believe this feature is an important reason why many websites have been reduced to dumbed-down versions of their native counterparts that only exist to promote them.
In other words, Apple already provides developers with a declarative mechanism to promote installing native apps directly from their web apps. These smart banners even appear inside installed PWAs, which makes for a confusing user experience: if I already installed the web app, why am I asked to install another, native version?
This raises an obvious question: if allowing web app to encourage installation undermines genuine user intent or creates opportunities for abuse, why is the same behavior acceptable when the destination is a native app?
In fact, Smart App Banners can appear automatically, without the user asking for installation. This is similar to the behavior of the beforeinstallprompt and exactly the behavior Apple says it wants to prevent.
Yet they still oppose the new <install> element, which requires explicit user interaction with a browser-rendered control, with safeguards against misleading activation.
Chrome 158 now supports the declarative <install> element, a browser-rendered button that was designed to address WebKit’s objections. It doesn’t install a web app by itself, but instead hands over the flow to the browser that then decides how it will proceed.
This minimal example shows how the web app that displays it can be installed, with the text “Install app” as fallback text for non-supporting browsers:
<install>Install app</install>
<install> element rendered in Chrome 158
The presentation and behavior are under tight browser control. Styling with CSS is limited, so it can’t be styled in a way that may mislead users. The text and icon can’t be hidden to trick
正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。
