Protocol Handlers
Lets a site or installed app handle links like mailto: or web+music:.
In one line
Can open links like mailto: in the site after you approve it
Lets a site or installed app handle links like mailto: or web+music:.
Opens links with that scheme in the site after the person approves.
What it can and can't do
What the user does: You tap a mailto: or similar link and approve the site as its handler
It can
- Open that kind of link in the site after you approve
- Handle custom link types like web+music:
- Ask again if you change your mind in settings
It cannot
- Take over links without your approval
- Work in Firefox for most link types, Safari or on phones
- Open links in other apps
- Hijack links from sites you never approved
How it differs between platforms: Chrome and Edge on computers ask first. Firefox, Safari and phones do not support it.
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 96 | 2021-11-15 | None |
| Edge | Supported | 96 | 2021-11-19 | None |
| Firefox | Not supported | Not available | Not listed | None |
| Safari | Not supported | Not available | Not listed | None |
| Safari on iPhone | Not supported | Not available | Not listed | None |
| Chrome on Android | Not supported | Not available | Not listed | None |
| Samsung Internet | Not supported | Not available | Not listed | None |
How a site asks for it
| API | navigator.registerProtocolHandler(scheme,url); manifest protocol_handlers |
| Browser compat keys | manifests.webapp.protocol_handlers |
| How access is granted | prompt |
| What the user sees | Handler registration prompt |
| Needs a secure context (HTTPS) | Yes |
| Needs a user gesture | Yes |
| How long it lasts | Per origin |
| How to take it back | Site settings |
| Inside an iframe | Same as top level; cross-origin iframes need a permissions policy where listed |
Typical flow
- Call the API
- Browser applies its access rules
- Page receives the result
Data you get
What comes back: Lets a site or installed app handle links like mailto: or web+music:.
Shape: object
How often: on demand
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
scheme | string | None | mailto, web+*, ... | Not listed |
Technical limits
- Safari ignores it
- Custom schemes must start with web+
- Manifest handlers desktop only
The story
What it is
A site can ask to open links like mailto: or custom web+ links, so clicking them opens that site.
For you
You may see a small prompt asking to let a site open links of one type, such as mail links. If you allow, clicking such a link opens that site. You can change it in browser settings.
For makers
Makers of web mail, chat and calendar apps want to be the default for those links. It makes their web app part of daily flow. It needs an allow, to stop sites from hijacking links.
Where you see it
| Type | Example | Apps |
|---|---|---|
| messaging | Gmail asks to handle mailto links, so clicking an email address anywhere opens a new Gmail draft. | Gmail |
| video | A meeting site registers to open meeting links, so clicking one opens its web app. | Zoom, Microsoft Teams |
| music | A web music player handles a custom music link type, so a shared link starts the song. | None named |
| games | A web game launcher handles invite links so a click opens the right game room. | None named |
| productivity | A web calendar app handles calendar links to add events. | Google Calendar |
| social | A chat web app handles chat invites from messages and web pages. | Discord, Telegram Web |
| security | A malicious site tries to take over mail links to capture drafts. The prompt gives you a chance to refuse. | None named |
Risks
- Link hijack risk
- Easy to click allow
What the platform says
- MDN Web Docs: registerProtocolHandler. Lets a site or installed app register to handle certain link types, like mail links.
Good uses and abuse
Legitimate uses
- Mailto handlers
Known abuse
- Link hijacking
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 2 of 5 | How revealing the data is |
| Utility | 2 of 5 | How useful it is to honest apps |
| Friction | 1 of 5 | How much the user has to do |
| Fingerprint bits | Not rated | Rough identifying entropy, when known |
History
- 2010, Chrome 13: registerProtocolHandler
- 2021, Chrome 96: Manifest protocol_handlers on desktop
Sources
How well checked: Checked against real behavior.