You are here: Reference > JavaScript > client-side > browser > methods > registerContentHandler (navigator)

registerContentHandler method (navigator)

Browser support:
Allows registering a web site as a possible handler for content of the specified MIME type.
Because of security restrictions, only those web sites can be registered as content handlers that are located in the same domain that the page is served from.
Registered content handlers can be removed manually. First backup the prefs.js file (this page helps to find your profile file: Profiles (Mozilla)). Open the original prefs.js file in a text editor, remove the 'browser.contentHandlers.types.X.title', 'browser.contentHandlers.types.X.type' and 'browser.contentHandlers.types.X.uri' entries where X is an integer that identifies the index of your content handler and save it.


object.registerContentHandler (MIMEtype, URI, title);
You can find the related objects in the Supported by objects section below.


Required. String that specifies a MIME type to handle.
One of the following values (all values have the same effect):
RSS feed
RSS feed
RSS feed
Required. String that specifies the Uniform Resource Identifier to the handler. The '%s' substring will be replaced with the contents.
Required. String that specifies a title for the handler. This title will be displayed in the confirmation box when the handler is being registered.

Return value:

This method has no return value.

Example HTML code 1:

This example shows the use of the registerContentHandler method (note that the '' file is not a valid content handler, this example is only an illustration).
    <script type="text/javascript">
        function RegisterHandler () {
            navigator.registerContentHandler('application/vnd.mozilla.maybe.feed', '', 'Dottoro RSS handler');

    <button onclick="RegisterHandler ();">Register a content handler for a specific mimeType!</button>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content