Windows RSS Publisher’s Guide, Part 1: Feed Auto-discovery


Today is the first installment of the Windows RSS “Publisher’s Guide.” Over the development of the RSS features in Windows Vista, we’ll post regular features on what RSS feed publishers need to do to properly integrate with IE. In general, these will be simply be to do what most people in the community already expect (this post is a great example of that), so there will be few surprises. However, we think that being explicit about exactly what we support never hurt anyone. This way, the community can tell us if we’re doing something wrong, or we can explain why we chose one particular direction over another. Hopefully, this particular topic won’t be controversial.


The most up-to-date version of the “Publisher’s Guide” will always be available at this link: http://blogs.msdn.com/rssteam/articles/PublishersGuide.aspx. Each time we add something to it, we’ll post to the blog as well. Once we ship, we’ll mirror the guide on MSDN.



RSS autodiscovery


The “Web Feeds” button in IE 7 for Windows XP and in Windows Vista is designed to “light up” when the web page the user is viewing has an associated web feed.


Overview



In order to tell IE (and other browsers, for that matter), that your page has an associated web feed, you need to add a link element inside the header of your web page.



<html>
  <head>
    <link rel=”alternate” type=”application/rss+xml” title=”your feed title here” href=”http://www.company.com/feedurl.rss“>
  </head>
<body>


Put the title of your feed in the title attribute and the URL to the feed itself in the href attribute. And, you’re done.


Now, when a user goes to your web page, the “Web Feeds” button will light up (and if the user chooses, a sound can play). When the user clicks on the button, it will display the title that you put in the link element, and clicking on the title will navigate the user to preview the feed itself (which IE will render in a readable form in the browser – from there the user will be able to subscribe to your feed).


Multiple feeds



As it happens, you can have as many of the <link> elements in your web page and IE 7 Beta 1 will show the titles of all of them in a list, in the order you put them in the page. The user can pick any of them to navigate to that feed.


Here’s an example of the button in IE 7 Beta 1 lighting up on the MSNBC site:



Best Practices



The following is a collection of best practices (do’s and don’ts) for how to leverage RSS autodiscovery in your web pages.


DO choose good titles


As you can see in the example above, IE will display the title as you write it in your page. Therefore, it’s a good idea to actually put the title of the feed right there. A few sites (like this one!) have “RSS” as their title.


DON’T list the same feed in different formats


Unless you have a really good reason, it’s not a good idea to have two links (or three!) that provide the same feed in different formats. It just makes the user have to pick between two things that they are not capable of distinguishing between. Pick your favorite format, and just support that.



DO put your most relevant feed first


You are always welcome to put as many feeds as you want in your header, but you should make sure that the one at the top is the one that’s most relevant to the page itself. In future updates to IE 7, we will be making changes to optimize for the most common scenario of having a single feed. Getting to that first (or only) feed in the list will be one-click away. Getting to the others will be one or two more clicks.



DO continue providing links to your feed(s) in your web page


There’s no harm in continuing to provide ordinary to your feeds in the web page. In many cases, you can provide a more descriptive text than you can fit in the link element. Whether the user clicks on the Web Feeds button or the user clicks on one of those links, IE will recognize that’s it is a feed and display it properly. Additionally, in some cases — for example, sites with lots of feeds — it’s probably best to simply provide links to those in a list on the page instead of putting two dozen feeds in the header.


References



Mark Pilgrim’s post on RSS autodiscovery: http://diveintomark.org/archives/2002/06/02/important_change_to_the_link_tag


Note: In future releases of IE 7, we’ll support Atom autodiscovery as well. When we do, we will update this publisher’s guide.


Hope this was helpful!


– Sean

Comments (15)

  1. I have a suggestion for Microsoft publishers.

    DO NOT include ugly HTML in your RSS feeds.

    Did you do a view source before you posted?

    Why are you insisting on changing your font sizes? It looked horrible in my aggregator!

    Also. Your HTML doesn’t even attempt to be well formed. Your attributes aren’t even quoted.

  2. rss says:

    HTML cleaned up

    – Sean

  3. He estado probando el BETA 1 de IE 7 que ofrece buenas caracter&#237;sticas

    que no se ofrec&#237;an anteriormente…

  4. Jorgie says:

    LOL, now make Community Server follow your rules..

    It has two RSS links in the head section, one titled "RSS" and one titled "ATOM"…

    So your links are breaking at least two of your own rules. Not using a descriptive titles and offering two formats for the same content. 🙂

    Jorgie

  5. Simon Mackay says:

    Hi all!

    Will the autodiscovery function be able to differentiate between content for particular feeds? What I am talking about is whether it could determine if a feed is a podcast feed, a photoblog feed, calendar feed or simply a regular feed.

    If it is able to, you could have different handlers for different content types such as a screensaver for photoblogs, a "podcatcher" which places podcasts in the sync queue for your MP3 player or burns podcasts to CD or an Outlook add-on that goes through a calendar feed and adds events in the feed to your Outlook calendar.

    With regards,

    Simon Mackay

  6. arjun banker says:

    I think I may be missing something in the Vista IE7 bits, but is there no way to be notified when the subscribed RSS feed is updated?

  7. Lanod says:

    "DO choose good titles

    As you can see in the example above, IE will display the title as you write it in your page. Therefore, it’s a good idea to actually put the title of the feed right there. A few sites we’ve seen have “RSS” as their title"

    Like the IE blog discussing these features! – http://blogs.msdn.com/ie/archive/2005/08/02/446280.aspx

  8. Jeff Parker says:

    Questions though, how does this handle multiple feeds on a page, for example say you have several categories. You may have a feed for each of those categories and you may have a feed for everything. Does it matter how many you have there? And like here in these blogs, there is an Atom and an RSS feed, will IE Show both, I think the reason we present 2 feeds is because of different aggregators, well if IE does both they why does it matter which one a person chooses. So will IE show both feeds even though they have the exact same content in them wouldn’t that just be confusing to the user wondering why the same thing is listed twice, hence more support calls to microsoft and the web developer or will IE favor one over the other or let the user choose which one to favor.

    On a side note as well did you guys see per one of my suggestions on the IE blog. move the Printer button from default location because for me anyway the printer buttons was put between the 2 rss buttons. I don’t know how many times while going after the rss buttons I clicked on print. Yes I went in a just removed it but I thought it was a bad location for the printer button. In older IE the print button was way off on the far side and really out of the way, I mean compaired to the number of web pages you view and the number you print the print buttons isn’t that useful anyway. For me it would be maybe .00001% of the pages I view would be printed. Then they are typically not printed with the button anyway msdn has a nice print feature that prints just the article or I go up and print selected. Just a suggestion I would probably use the RSS more than the print as well.

  9. rss says:

    Yep, we know that blogs.msdn.com breaks a couple of our "rules" (which are really guidelines). 🙂 We’re working with the team to change how the server works.

    But again, these are guidelines, and if a publisher wants to do something different, they are certainly entitled to.

  10. Hannes Magnusson says:

    "DON’T list the same feed in different formats

    Unless you have a really good reason, it’s not a good idea to have two links (or three!) that provide the same feed in different formats. It just makes the user have to pick between two things that they are not capable of distinguishing between. Pick your favorite format, and just support that. "

    view->source:

    <link rel="alternate" type="application/rss+xml" title="RSS" href="http://blogs.msdn.com/rssteam/rss.aspx&quot; />

    <link rel="alternate" type="application/atom+xml" title="ATOM" href="http://blogs.msdn.com/rssteam/atom.aspx&quot; />

    Hmh?

  11. Kinlan says:

    Thats a great bit of information. I have now updated my blog to automatically be detected in IE7 which is a good thing, all I need now is for it to get converted properly 🙂

    How do we as feed publishers make our feeds get transformed into a readable format by IE7? I seemed to have missed that piece of information.

    Here are some of the links I have posted about IE. Mostly suggestions and things I have discovered about IE7 Feed support.

    <a href="http://www.kinlan.co.uk/2005/08/rss-feeds-that-dont-work-in-ie7.html">Here</a&gt;, <a href="http://www.kinlan.co.uk/2005/08/ie7-rss-feed-update-part-3-case-of.html">here</a&gt;, <a href="http://www.kinlan.co.uk/2005/08/ie7-rss-feed-update-part-2.html">here</a&gt;, <a href="http://www.kinlan.co.uk/2005/07/ie7-rss-feed-update.html">here</a&gt; and <a http://www.kinlan.co.uk/2005/07/ie7-suggestions-for-rss-feeds.html">here</a&gt;.

  12. Kinlan says:

    I also have another question.

    Will IE7 (and Longhorn) support the automatic finding of Feed links buried in a page. What I mean is, I have noticed that in the anchor "a" tag in HTML can support a "type" attribute, if this contained "application/rss+xml" would IE7 be able to use that as an indicator for a feed?

    I would really like it if IE7 could discover feeds I have linked to (or another developer etc) somewhere on my page.

    Obviously, you couldn’t list all the feeds because you could easily spam the user with thousands of links, but you could provide the first 10 maybe? A lot of people, including most of the microsoft blogs, have post categories with the associated feeds; I would like to be alerted to via the feed button.

    Sorry about the double posting of the links, they came out a bit rubbish in the previous post.

    http://www.kinlan.co.uk/2005/08/rss-feeds-that-dont-work-in-ie7.html

    http://www.kinlan.co.uk/2005/08/ie7-rss-feed-update-part-3-case-of.html

    http://www.kinlan.co.uk/2005/08/ie7-rss-feed-update-part-2.html

    http://www.kinlan.co.uk/2005/07/ie7-rss-feed-update.html

    http://www.kinlan.co.uk/2005/07/ie7-suggestions-for-rss-feeds.html

  13. Willy Nilly says:

    You write "DON’T list the same feed in different formats — Unless you have a really good reason, it’s not a good idea to have two links (or three!) that provide the same feed in different formats. It just makes the user have to pick between two things that they are not capable of distinguishing between. Pick your favorite format, and just support that."

    That eliminates choice and promotes dumbing down people who use Windows.

    It is already standard practice for popular Web software packages (particular blog packages) to create <link> tags for one feed in multiple formats. The reason is that not everybody uses the same RSS reader, obviously. Some people prefer RDF, some prefer RSS, others perfer ATOM, and so to acknowledge that fact considerate Web packages offer uses CHOICE.

  14. nechmads says:

    Now that I know hot to publich content – I can’t seem to find a way to get to the RSS Object Model in the WinFX. Is it part of Beta 1???

  15. John Woakes says:

    Should the href be an absolute URL (i.e. include the http://) or can it be a relative address like /blog/rss/feed.xml?