AndreT

I've created an RSS feed for my company to publish a daily health tip Monday-Friday. For the sake of simplicity, when I create the feed I go to the database and pull the latest tip available. On Saturday's and Sunday's, this means that the tip published on Friday is pulled again. I was aware of this happening from the get-go, so I added the skipDays tag to my feed as specified by the RSS 2.0 standards assuming that readers would then know to skip loading the feed for those days.

Unfortunately, when I view the feed on some common reader's, Friday's article appears 3 times on a Sunday. I know I'm going to have to go and revisit the way the feed is being generated (since the reader's that are causing this issue are some rather larger players, including Yahoo and RSSOwl), but I'm curious to know if I'm misusing the skipDays tag, or if this is something that these readers should be able to handle Have I misunderstood the intended use of the skipDays tag

Any input would be appreciated. Thanks!

Andre


Re: XML and the .NET Framework RSS 2.0 Standards Question

Sinan Ussakli - MSFT

AndreT,

In order to KISS, I think depending on skipDays is not good. Why Because even though you implement the skipDays correctly, the reader may not understand what skipDays mean, (there are many many RSS readers on the web and most of them support very basic rss tags) and if you depend your functionality on skipDays, it may not work.

The dynamic page that creates the rss should have a guid property at each item that uniquely identifies that item in order not to confuse the audience. If two items have different guids, then they will be considered as different. And as a common sense, do not add any new items to your RSS feed on Saturday and Sunday. You generally would like to include last 10-15 items on your rss, not the most recent one. The reader will identify and discard the duplicate ones, but if the user didn't sync for 3 days, he/she would have a chance to catchup as there are some history on the RSS (last 10 days)...

It's not really important for your users not to request updates on Saturday and Sunday, each RSS reader generally requests if there is any update per 15 mins, unless specified at the header (TTL field) of the rss (again this may not be implemented on the reader). The amount of data transferred at RSS generally should be small (don't put the whole article, just include a simple abstract and a link to article.

Having said that a sample rss with skipdays would be:

< xml version="1.0" encoding="ISO-8859-1" >
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title></title>
<link></link>
<description></description>
<language></language>
<skipDays>
<day>Saturday</day>
<day>Sunday</day>
</skipDays>

....

I found this site searching by search.live.com, it gives quite good templates as examples.

http://www.notestips.com/80256B3A007F2692/1/NAMO5P9UPQ

Sinan






Re: XML and the .NET Framework RSS 2.0 Standards Question

AndreT

Thanks for the advice Sinan.

Andre




Re: XML and the .NET Framework RSS 2.0 Standards Question

Brian Kuhn

These skipHours and skipDays sub-elements of <channel> came from scriptingNews format, designed in late 1997, and adopted by Netscape in RSS 0.91 in the spring of 1999.

Per the specification as I understand it, these elements provide a hint for aggregators telling them which hours/days they can skip reading the feed channel information. In practice most RSS feed readers do not honor these elements, and to compound matters the majority of RSS feeds do not supply these elements in the wild.

You can reasonably expect that many feed aggregators will read your published feed regardless of the time-to-live or skip days/hours information you provide. I would suggest that the best course of action would be to modify your feed generation logic to only publish new channel items on Monday-Friday and not add new channel items on the weekend.

If you are having trouble with the feed generation, I wrote a Microsoft .NET class library framework that is available on CodePlex at http://www.codeplex.com/argotic, and in the upcoming .NET 3.5 framework Microsoft will be providing support for handling syndication.

As the original RSS 2.0 specification can be somewhat hazy on details, I would like to point you to http://www.rssboard.org/rss-specification, which usually does a better job of explaining the specification elements.




Re: XML and the .NET Framework RSS 2.0 Standards Question

Sinan Ussakli - MSFT

Wonderful answer Brian.