2

As we know, the RSS data will update if the website manager update it, or the third-part lib to update the RSS feed data.

Now if I am writing a RSS Reader, every time I fetch the data from the website's RSS source.

How can I ensure the data whether is fetched?

From the wikipedia RSS :

Only the title, link, description fields are required. the pubDate is not required. So, I can not insure the data whether is fetched by us via pubDate or other fields(like lastBuildDate field).

So, which friend can tell me how do you verify the feed data whether is fetched by us?

aircraft
  • 25,146
  • 28
  • 91
  • 166

2 Answers2

0

When reading an RSS feed, the guid element of each item is used to check whether the item has been read before.

A guid can be a permalink to the HTML version of the item, like this:

<guid>http://dallas.example.com/1983/05/06/joebob.htm</guid>

A guid also can be any other text that provides a unique value for an item, such as one using the TAG URI specification, as in this example:

<guid isPermaLink="false">tag:dallas.example.com,4131:news</guid>

Although the name guid stands for Globally Unique ID, there is no requirement in RSS for a guid value to be globally unique. At most you can hope that it will be unique for that feed publisher.

The guid element is optional.

rcade
  • 204
  • 1
  • 11
0

Finally I find the link can ensure a item whether is fetched.

I can save the fetched data in my database, every time the user fetch data, it can check the data whether is exists in the database by link property.

aircraft
  • 25,146
  • 28
  • 91
  • 166