coderef

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: 155
Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154
Firefox
1–1.5Not supported
2+Supportedsince Oct 24, 2006
Current: 157
Safari
✕Not supportedup to 27
Current: 27
MobileChrome Android
✕Not supportedup to 155
Current: 155
Firefox Android
4+Supportedsince Mar 29, 2011
Current: 157
Safari iOS
✕Not supportedup to 27
Current: 27

How 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
}

Sub-features

Support for each part of the feature (27). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
Navigator.registerProtocolHandler13792✕✕4✕
Navigator.registerProtocolHandler.scheme_parameter_bitcoin28792✕✕4✕
Navigator.registerProtocolHandler.scheme_parameter_ftp✕✕98✕✕98✕
Navigator.registerProtocolHandler.scheme_parameter_ftps✕✕98✕✕98✕
Navigator.registerProtocolHandler.scheme_parameter_geo30792✕✕4✕
Navigator.registerProtocolHandler.scheme_parameter_im30792✕✕4✕
Navigator.registerProtocolHandler.scheme_parameter_irc15792✕✕4✕
Navigator.registerProtocolHandler.scheme_parameter_ircs30792✕✕4✕
Navigator.registerProtocolHandler.scheme_parameter_magnet30792✕✕4✕
Navigator.registerProtocolHandler.scheme_parameter_mailto13792✕✕4✕
Navigator.registerProtocolHandler.scheme_parameter_matrix929290✕✕90✕
Navigator.registerProtocolHandler.scheme_parameter_mms13792✕✕4✕
Navigator.registerProtocolHandler.scheme_parameter_news13792✕✕4✕
Navigator.registerProtocolHandler.scheme_parameter_nntp13792✕✕4✕
Navigator.registerProtocolHandler.scheme_parameter_openpgp4fpr42792✕✕4✕
Navigator.registerProtocolHandler.scheme_parameter_sftp✕✕98✕✕98✕
Navigator.registerProtocolHandler.scheme_parameter_sip30792✕✕4✕
Navigator.registerProtocolHandler.scheme_parameter_sms13792✕✕4✕
Navigator.registerProtocolHandler.scheme_parameter_smsto26792✕✕4✕
Navigator.registerProtocolHandler.scheme_parameter_ssh41792✕✕4✕
Show 7 more
Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
Navigator.registerProtocolHandler.scheme_parameter_tel13792✕✕4✕
Navigator.registerProtocolHandler.scheme_parameter_urn13792✕✕4✕
Navigator.registerProtocolHandler.scheme_parameter_webcal13792✕✕4✕
Navigator.registerProtocolHandler.scheme_parameter_wtai31792✕✕4✕
Navigator.registerProtocolHandler.scheme_parameter_xmpp30792✕✕4✕
Navigator.registerProtocolHandler.secure_context_required807962✕✕✕✕
Navigator.unregisterProtocolHandler3879✕✕✕✕✕