user4209617
user4209617

Reputation:

Can an RSS guid be considered globally unique?

I need to store new items from multiple RSS feeds in a database. I would like to use the GUID tag of each item to determine, whether it already exists in the database.

See the W3C specification:

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.

...

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.

So my question is, is it safe to consider a GUID unique among different feeds? Or will I need to combine the GUID with the feed it comes from, to make sure there are no duplicate GUIDs?

Upvotes: 5

Views: 3338

Answers (3)

mohamed youssef
mohamed youssef

Reputation: 1

i think you have to try this way by this website

UUid generqator

to generate rss feed ID also you can generate unique for every link you want to add but i don't know about false or true i think you have to set false for every other link of posts

Upvotes: 0

janih
janih

Reputation: 2234

The GUID is not even mandatory, so in my opinion it is not safe to consider it unique. I'd suggest you read this blog post about rss feed duplicate detection. (archived copy)

Upvotes: 6

Julien Genestoux
Julien Genestoux

Reputation: 33012

Unfortunately, they should not be considered unique, however, if, indeed, the RSS 2.0 spec says they're optional, they should be very strongly recommended as the most efficient mechanism to identify new entries from old ones.

Upvotes: 1

Related Questions