Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Adding feed readers to Firefox

Starting with Firefox 2, Firefox has support for selecting different RSS or Atom feed readers to use when you try to read a feed. This article provides information about how to add support for additional readers not supported by default.

Adding a new web-based feed reader

Adding a feed reader from a web application

JavaScript code on the web can add a feed reader easily, using the navigator.registerContentHandler() function, like this:

navigator.registerContentHandler("application/vnd.mozilla.maybe.feed",
                                 "https://www.example.com/?feed-feed=%s",
                                 "My Feed Reader");

Note that web content is limited to adding handler URLs which have the same origin as the page performing the call.

Adding a feed reader from an extension

Extensions wishing to register feed readers should do so using the privileged API, which bypasses user confirmation and does not restrict the handler URI to the same origin as the caller.

Cc["@mozilla.org/embeddor.implemented/web-content-handler-registrar;1"]
    .getService(Ci.nsIWebContentHandlerRegistrar)
    .registerContentHandler("application/vnd.mozilla.maybe.feed",
                            "chrome://example/content/feed.xul?feed-url=%s",
                            "My Feed Reader",
                            null /* Source window. Leave null when the request originates in privileged code */);

Adding a new feed reader manually

To add support for a new web-based feed reader, all you need to do is add three new preferences:

browser.contentHandlers.types.number.title
The name of the feed reader.
browser.contentHandlers.types.number.type
For a feed reader, this should be "application/vnd.mozilla.maybe.feed".
browser.contentHandlers.types.number.uri
The URI of the feed reader. Use "%s" where the URL of the feed should be inserted.

number should be replaced with the next highest unique number that hasn't already been used. For example, if you want to add a new feed reader called "Easy Reader", and there are already defined content handlers with numbers 0 through 4, you should use a number of 5, like this:

  • browser.contentHandlers.types.5.title: Easy Reader
  • browser.contentHandlers.types.5.type: application/vnd.mozilla.maybe.feed
  • browser.contentHandlers.types.5.uri: https://www.theeasyreaderurl.com?feed=%s

You can add these preferences by hand, by visiting about:config, or you can do it programmatically, if an extension wishes to install a new feed reader.

Adding a new feed reader application

The easiest way to do this is to simply use the provided user interface, by using the Feeds panel in the Preferences (or Options, depending on your platform) window.

Note: Starting in Firefox 8, there is no longer a Feeds panel. Feed reader developers are encouraged to implement JavaScript as described above to add themselves as an option for web feed handling.

This can also be done programmatically by an extension, which is done by setting the value of the browser.feeds.handlers.application option to the pathname of the application to use for reading feeds.

See Also

Document Tags and Contributors

 Contributors to this page: teoli, kmaglione, trevorh, Sheppy, borismann, Naesten, Mgjbot, Kohei, Nukeador
 Last updated by: kmaglione,