registerProtocolHandlerLimited availability
The navigator.registerProtocolHandler() method declares a site's ability to handle an address scheme (also known as a protocol). For example, an email site can register to open mailto: URLs or a VoIP site to open tel: URLs.
Not yet supported in all major browsers — check the table and provide a fallback.
Browser support
DesktopChrome
1–12Not supported
13+Supportedsince Aug 2, 2011
Current: 155Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154Firefox
1–1.5Not supported
2+Supportedsince Oct 24, 2006
Current: 157Safari
✕Not supportedup to 27
Current: 27MobileChrome Android
✕Not supportedup to 155
Current: 155Firefox Android
4+Supportedsince Mar 29, 2011
Current: 157Safari iOS
✕Not supportedup to 27
Current: 27How to use
Not supported in Safari, Chrome Android, Safari iOS. Use feature detection below and provide a fallback (or a polyfill) for those browsers.
Example
Full syntax and examples are on MDN: registerProtocolHandler.
Feature detection
JS · check before using
if ("Navigator" in globalThis && "registerProtocolHandler" in Navigator.prototype) {
// Navigator.registerProtocolHandler is available
}Documentation (MDN)
Specification
Sub-features
Support for each part of the feature (27). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| Navigator.registerProtocolHandler | 13 | 79 | 2 | ✕ | ✕ | 4 | ✕ |
| Navigator.registerProtocolHandler.scheme_parameter_bitcoin | 28 | 79 | 2 | ✕ | ✕ | 4 | ✕ |
| Navigator.registerProtocolHandler.scheme_parameter_ftp | ✕ | ✕ | 98 | ✕ | ✕ | 98 | ✕ |
| Navigator.registerProtocolHandler.scheme_parameter_ftps | ✕ | ✕ | 98 | ✕ | ✕ | 98 | ✕ |
| Navigator.registerProtocolHandler.scheme_parameter_geo | 30 | 79 | 2 | ✕ | ✕ | 4 | ✕ |
| Navigator.registerProtocolHandler.scheme_parameter_im | 30 | 79 | 2 | ✕ | ✕ | 4 | ✕ |
| Navigator.registerProtocolHandler.scheme_parameter_irc | 15 | 79 | 2 | ✕ | ✕ | 4 | ✕ |
| Navigator.registerProtocolHandler.scheme_parameter_ircs | 30 | 79 | 2 | ✕ | ✕ | 4 | ✕ |
| Navigator.registerProtocolHandler.scheme_parameter_magnet | 30 | 79 | 2 | ✕ | ✕ | 4 | ✕ |
| Navigator.registerProtocolHandler.scheme_parameter_mailto | 13 | 79 | 2 | ✕ | ✕ | 4 | ✕ |
| Navigator.registerProtocolHandler.scheme_parameter_matrix | 92 | 92 | 90 | ✕ | ✕ | 90 | ✕ |
| Navigator.registerProtocolHandler.scheme_parameter_mms | 13 | 79 | 2 | ✕ | ✕ | 4 | ✕ |
| Navigator.registerProtocolHandler.scheme_parameter_news | 13 | 79 | 2 | ✕ | ✕ | 4 | ✕ |
| Navigator.registerProtocolHandler.scheme_parameter_nntp | 13 | 79 | 2 | ✕ | ✕ | 4 | ✕ |
| Navigator.registerProtocolHandler.scheme_parameter_openpgp4fpr | 42 | 79 | 2 | ✕ | ✕ | 4 | ✕ |
| Navigator.registerProtocolHandler.scheme_parameter_sftp | ✕ | ✕ | 98 | ✕ | ✕ | 98 | ✕ |
| Navigator.registerProtocolHandler.scheme_parameter_sip | 30 | 79 | 2 | ✕ | ✕ | 4 | ✕ |
| Navigator.registerProtocolHandler.scheme_parameter_sms | 13 | 79 | 2 | ✕ | ✕ | 4 | ✕ |
| Navigator.registerProtocolHandler.scheme_parameter_smsto | 26 | 79 | 2 | ✕ | ✕ | 4 | ✕ |
| Navigator.registerProtocolHandler.scheme_parameter_ssh | 41 | 79 | 2 | ✕ | ✕ | 4 | ✕ |
Show 7 more
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| Navigator.registerProtocolHandler.scheme_parameter_tel | 13 | 79 | 2 | ✕ | ✕ | 4 | ✕ |
| Navigator.registerProtocolHandler.scheme_parameter_urn | 13 | 79 | 2 | ✕ | ✕ | 4 | ✕ |
| Navigator.registerProtocolHandler.scheme_parameter_webcal | 13 | 79 | 2 | ✕ | ✕ | 4 | ✕ |
| Navigator.registerProtocolHandler.scheme_parameter_wtai | 31 | 79 | 2 | ✕ | ✕ | 4 | ✕ |
| Navigator.registerProtocolHandler.scheme_parameter_xmpp | 30 | 79 | 2 | ✕ | ✕ | 4 | ✕ |
| Navigator.registerProtocolHandler.secure_context_required | 80 | 79 | 62 | ✕ | ✕ | ✕ | ✕ |
| Navigator.unregisterProtocolHandler | 38 | 79 | ✕ | ✕ | ✕ | ✕ | ✕ |