-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
What problem are you trying to solve?
Web developers currently lack a standardized way to open links directly in native apps from HTML. To achieve this behavior, they must rely on platform-specific workarounds like custom URL schemes, Android intent links, or deep linking configurations. These approaches are inconsistent across platforms, difficult to maintain, and unintuitive for developers. This fragmentation leads to poor user experiences, especially on mobile, where users expect links to open in the appropriate app when available.
What solutions exist today?
Today’s solutions include:
- Custom URL schemes (e.g., twitter://, whatsapp://) — require app-specific knowledge and fail silently if the app isn’t installed.
- Android intent links — powerful but Android-only and verbose.
- Universal Links (iOS) / App Links (Android) — require server-side configuration, HTTPS, and app registration, making them complex to implement and debug.
- JavaScript-based fallbacks — often used to detect app presence and redirect, but these are unreliable and add complexity.
None of these are standardized in HTML, and all require extra effort for cross-platform compatibility.
How would you solve it?
Introduce a new HTML anchor attribute:
Open in App
This target="_app" attribute would signal the browser to:
- Attempt to open the link in a native app if one is registered for the URL.
- Fall back to opening the link in the browser if no app is available.
This approach would: - Simplify developer workflows.
- Improve mobile user experience.
- Provide a consistent, declarative way to express app-preferred navigation.
Anything else?
- Security: Browsers should ensure this behavior doesn’t allow privilege escalation or spoofing.
- Privacy: The browser should not leak app presence unless the user clicks the link.
- Graceful fallback: If no app is installed, the link should behave like a normal anchor tag.
This proposal aligns with the spirit of HTML: declarative, accessible, and user-first. It would empower developers to create smoother mobile experiences without relying on brittle hacks.