Bagikan melalui


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: https://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=" https://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: https://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

  • Anonymous
    August 02, 2005
    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.
  • Anonymous
    August 02, 2005
    HTML cleaned up

    - Sean
  • Anonymous
    August 02, 2005
    He estado probando el BETA 1 de IE 7 que ofrece buenas caracter&#237;sticas
    que no se ofrec&#237;an anteriormente...
  • Anonymous
    August 02, 2005
    The comment has been removed
  • Anonymous
    August 02, 2005
    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
  • Anonymous
    August 02, 2005
    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?
  • Anonymous
    August 02, 2005
    "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

  • Anonymous
    August 03, 2005
    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.
  • Anonymous
    August 03, 2005
    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.
  • Anonymous
    August 03, 2005
    "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" />
    <link rel="alternate" type="application/atom+xml" title="ATOM" href="http://blogs.msdn.com/rssteam/atom.aspx" />

    Hmh?
  • Anonymous
    August 04, 2005
    The comment has been removed
  • Anonymous
    August 04, 2005
    The comment has been removed
  • Anonymous
    August 17, 2005
    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.


  • Anonymous
    August 18, 2005
    The comment has been removed
  • Anonymous
    October 19, 2005
    Should the href be an absolute URL (i.e. include the http://) or can it be a relative address like /blog/rss/feed.xml?