Adding feed readers to Firefox

  • Revision slug: Adding_feed_readers_to_Firefox
  • Revision title: Adding feed readers to Firefox
  • Revision id: 60012
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment copy edit; 10 words added, 6 words removed

Revision Content

{{ Fx_minversion_header("2") }} 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

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: http://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 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",
                                 "http://www.theeasyreaderurl.com?feed=%s",
                                 "Easy 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

  • {{ domxref("window.navigator.registerContentHandler()") }}

{{ languages( { "es": "es/A\u00f1adir_lectores_de_canales_a_Firefox", "ja": "ja/Adding_feed_readers_to_Firefox", "zh-tw": "zh_tw/\u65b0\u589e\u6d88\u606f\u4f86\u6e90\u95b1\u8b80\u5de5\u5177" } ) }}

Revision Source

<p>{{ Fx_minversion_header("2") }} 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.</p>
<h2 id="Adding_a_new_web-based_feed_reader" name="Adding_a_new_web-based_feed_reader">Adding a new web-based feed reader</h2>
<p>To add support for a new web-based feed reader, all you need to do is add three new preferences:</p>
<dl> <dt><code>browser.contentHandlers.types.<em>number</em>.title</code></dt> <dd>The name of the feed reader.</dd> <dt><code>browser.contentHandlers.types.<em>number</em>.type</code></dt> <dd>For a feed reader, this should be "application/vnd.mozilla.maybe.feed".</dd> <dt><code>browser.contentHandlers.types.<em>number</em>.uri</code></dt> <dd>The URI of the feed reader. Use "%s" where the URL of the feed should be inserted.</dd>
</dl>
<p><code><em>number</em></code> 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 <code><em>number</em></code> of 5, like this:</p>
<ul> <li><code>browser.contentHandlers.types.5.title</code>: Easy Reader</li> <li><code>browser.contentHandlers.types.5.type</code>: application/vnd.mozilla.maybe.feed</li> <li><code>browser.contentHandlers.types.5.uri</code>: <span class="nowiki">http://www.theeasyreaderurl.com?feed=%s</span></li>
</ul>
<p>You can add these preferences by hand, by visiting <code>about:config</code>, or you can do it programmatically, if an extension wishes to install a new feed reader.</p>
<h3 id="Adding_a_feed_reader_from_a_web_application" name="Adding_a_feed_reader_from_a_web_application">Adding a feed reader from a web application</h3>
<p>JavaScript code on the web can add a feed reader easily, using the <code>navigator.registerContentHandler()</code> function, like this:</p>
<pre>navigator.registerContentHandler("application/vnd.mozilla.maybe.feed",
                                 "http://www.theeasyreaderurl.com?feed=%s",
                                 "Easy Reader");
</pre>
<h3 id="Adding_a_new_feed_reader_application">Adding a new feed reader application</h3>
<p>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.</p>
<div class="note"><strong>Note:</strong> 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.</div>
<p>This can also be done programmatically by an extension, which is done by setting the value of the <code>browser.feeds.handlers.application</code> option to the pathname of the application to use for reading feeds.</p><h3 id="See_Also">See Also</h3>
<ul> <li>{{ domxref("window.navigator.registerContentHandler()") }}</li>
</ul>
<p>{{ languages( { "es": "es/A\u00f1adir_lectores_de_canales_a_Firefox", "ja": "ja/Adding_feed_readers_to_Firefox", "zh-tw": "zh_tw/\u65b0\u589e\u6d88\u606f\u4f86\u6e90\u95b1\u8b80\u5de5\u5177" } ) }}</p>
Revert to this revision