This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
Allows web sites to register themselves as possible handlers for content of a particular MIME type.
Note:Web sites may only register content handlers for themselves. For security reasons, it's not possible for an extension or web site to register content handlers targeting other sites.
navigator.registerContentHandler(mimeType, uri, title);
mimeTypeis the desired MIME type as a string.
uriis the URI to the handler as a string.
titleis the title of the handler presented to the user as a string.
navigator.registerContentHandler( "application/vnd.mozilla.maybe.feed", "http://www.example.tld/?foo=%s", "My Feed Reader" );
For Firefox 2 and above, only the
application/rss+xml MIME types are supported. All values have the same
effect, and the registered handler will receive feeds in all Atom and RSS versions (see
Firefox is the only browser that implemented this feature, and it wasn't implemented to match the standard. This feature has since been removed from the HTML standard and shouldn't be used.
The definition of 'registerContentHandler()' in that specification.
|Recommendation||This feature is present in HTML 5.2, but has since been removed from the WHATWG HTML Living Standard.|
BCD tables only load in the browser
- Web-based protocol handlers
- Web activities, particularly view and open
- XPCOM Interface Reference > nsIWebContentHandlerRegistrar > registerContentHandler - This shows how to use this function XPCOM scope