navigator.unregisterProtocolHandler(scheme, url) removes a previously registered protocol handler for a URL scheme. It is the inverse of registerProtocolHandler() (MDN). Returns undefined.
Pass the required arguments shown below. Check return values and browser support before you rely on the result.
Syntax
Call navigator.unregisterProtocolHandler. Start with this line.
JavaScript
navigator.unregisterProtocolHandler(scheme, url)
Call
What it does
navigator.unregisterProtocolHandler(scheme, url)
Primary signature.
navigator.unregisterProtocolHandler(...)
Call with the arguments your case needs.
Built into the browser. Call unregisterProtocolHandler(...) on a Navigator — no import required.
Library declarations
JavaScript
navigator.unregisterProtocolHandler(scheme, url)
Parameters
Parameter
Description
scheme
Required. Protocol to unregister (e.g. "web+burger")
url
Required. Handler template with %s; must match registration
Return Value
Return Value
Description
*
Always undefined
JavaScript Examples
Example 1 — Feature-Detect
Check the method and secure context before calling.
JavaScript
const ok =
"unregisterProtocolHandler" in navigator &&
window.isSecureContext;
console.log(ok ? "ready to call" : "unavailable here");
Omit %s. The URL is incomplete for a handler template.
Engine throws SyntaxError. Documented on MDN.
Always include %s. Same rule as registerProtocolHandler.
Compatibility
Browser Support
Navigator.unregisterProtocolHandler() is Limited availability (not Baseline) on MDN. It requires a secure context. It is not Deprecated, Experimental, or Non-standard.
✓ Limited · Not Baseline
Navigator.unregisterProtocolHandler()
Support is strongest in some Chromium-based browsers on HTTPS. Always feature-detect and keep a no-op fallback.
LimitedNot Baseline
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Chromium & Legacy
Full support
Internet ExplorerIE 6+ · Legacy environments
Full support
OperaAll modern versions
Full support
navigator.unregisterProtocolHandler()Limited
Bottom line: Feature-detect, use same-origin HTTPS templates with %s, and never assume Baseline support.
Frequently Asked Questions
MDN: Navigator.unregisterProtocolHandler() removes a protocol handler for a given URL scheme. It is the inverse of registerProtocolHandler().
No. MDN does not mark it Deprecated, Experimental, or Non-standard. It is Limited availability (not Baseline) and requires a secure context.
Yes. Pass the same scheme and the same handler URL (including %s) that were used with registerProtocolHandler() (MDN).
Yes. The API is a secure-context feature. The handler URL must be http/https and same-origin as the page calling unregister (MDN).
SecurityError when the scheme is blocked, origin/https rules fail, or the context is insecure. SyntaxError when %s is missing from the handler URL (MDN).
The same permitted list as registration: schemes like mailto, tel, sms, bitcoin, and custom web+… names that follow the lowercase ASCII rules (MDN).