Changing GUIDs in RSS

Is the GUID of an RSS item allowed to change? SharpReader currently assumes it does not, and (when present) uses only the GUID to check if a new item is the same as a previously read one. This approach works fine for the most part, but some feeds change their GUIDs quite a bit. This resulted in some freeroller feeds for instance to show their items three times in my aggregator because over time, their GUID changed from freeroller.net to roller.anthonyeden.com to www.freeroller.net.

The RSS 2.0 spec defines the GUID element as follows:

<guid> is an optional sub-element of <item>.

guid stands for globally unique identifier. It's a string that uniquely identifies the item. When present, an aggregator may choose to use this string to determine if an item is new.

<guid>http://some.server.com/weblogItem3207</guid>

There are no rules for the syntax of a guid. Aggregators must view them as a string. It's up to the source of the feed to establish the uniqueness of the string.

If the guid element has an attribute named "isPermaLink" with a value of true, the reader may assume that it is a permalink to the item, that is, a url that can be opened in a Web browser, that points to the full item described by the <item> element. An example:

<guid isPermaLink="true">http://inessential.com/2002/09/01.php#a2</guid>

isPermaLink is optional, its default value is true. If its value is false, the guid may not be assumed to be a url, or a url to anything in particular.

While this doesn't say that the GUID is supposed to stay the same, it does say "an aggregator may choose to use this string to determine if an item is new", which will only work for constant GUIDs.

In the spirit of parse at all costs though, an aggregator should attempt to handle feeds correctly even if they do not completely live up to the spec. This means that if two GUIDs are different, it should still check the other fields to check if this might be the same item after all.

Unfortunately this pretty much renders the GUID element useless, but so be it - I'm changing SharpReader tonight to still use GUIDs for equality of items, but no longer for inequality.