This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Need to understand how RSS reader works. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Need to understand how RSS reader works." Watch "Need to understand how RSS reader works." New topic
Author

Need to understand how RSS reader works.

Susan Smith
Ranch Hand

Joined: Oct 13, 2007
Posts: 224
Hello, I'm not sure if this is the correct place to ask question about RSS.
Please let me know if I should ask the question to another forum.

I'm new at RSS. I need help to understand how RSS works.

Basically I have tried creating a RSS feed with a program that will update the RSS feed every 15 minutes (in my case an XML file).
I have validated the feed using http://www.feedvalidator.org/ and it passed the validation.

Then I added my RSS URL into Google Reader + Internet Explorer 7 RSS reader.
Google Reader displays the items in my RSS feed correctly at the very beginning after subscribe, but then even though the XML file has been updated, it doesn't show up there.
Internet Explorer 7 reader displays only one items from my RSS feed correctly at the very beginning after subscribe, but same with Google Reader, it doesn't show me any update.

Isn't reader like Google Reader/ Internet Explorer 7 RSS reader supposedly will display update?
What is it looking for to detect updates? Is it the number of "<item>" tag or something else?

Thanks in advance for all the help.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41079
    
  43
Have you compared your feeds with some other existing ones, e.g. this one from JavaRanch? Maybe anything jumps out that you're doing differently?


Ping & DNS - my free Android networking tools app
Susan Smith
Ranch Hand

Joined: Oct 13, 2007
Posts: 224
(1.)
Thanks for your reply. Here's what I found compared to the RSS link that you gave me:
- I don't have the uniqueID attribute in the item tag.
- I don't have element.
- I don't have element.
Would these make any difference?

(2.)
Regarding Google Reader, I opened it again this morning. It shows me some updates on 12:07 just last night, a couple more updates on 6:07 AM this morning and 9:07 AM this morning. There seems to be a pattern.
Then I looked at the HELP section. This is what it says:
Google Reader will check your subscriptions for updates about once an hour. Updates may occur a bit less frequently for feeds that have few subscribers.

Note that clicking the Refresh button in Google Reader does not cause it to actually check your subscriptions for new items. It simply updates your screen with any new items that Google Reader may have already collected.


Could this be the cause of the problem? Are all RSS readers mostly behaving this way?

(3.)
Is there any general rule of how RSS readers detect updates from a feed?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41079
    
  43
You should really have a uniqueID attribute. The RSS reader needs to identify entries between updates, and this ID makes that possible.

Most readers can be told how often to check which feed. Google's reader seems to be special in that it looks at every feed once an hour. Sometimes that doesn't make sense, as there are feeds that get updated just once a day, but I guess Google didn't want to add that complexity to their software.

When readers check for updates, they need the help of the RSS source. Basically, the reader sends the time of its last access, and then the RSS server either says "nothing has changed since your last visit" or "something has changed, here is the feed". The details can be found here. Just to give a number, implementing that has cut the amount of RSS data served by the Saloon RSS feeds by about two-thirds.
Susan Smith
Ranch Hand

Joined: Oct 13, 2007
Posts: 224
Ulf,

The items on my RSS is differentiate by an id.

If I do this.


Is it redundant to add guid subelment under the item element:
Susan Smith
Ranch Hand

Joined: Oct 13, 2007
Posts: 224
Ulf,

I tried to add uniqueID to my RSS feed and the feedvalidator.org says that it's invalid feed. I tried to validate the javaranch RSS link that you gave me, it also throws the same error.

And one thing that I'm still confused about is the javaranch RSS has extension "rss" while what I have is with extension: ".xml". What are the difference between these two?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41079
    
  43
Turns out I wasn't remembering things correctly. uniqueID is actually something we use for our own JavaRanch purposes. "guid" is really the one that you need to have. My bad.

The extension -whether it's .xml or .rss or something else- doesn't really matter. The full URL is just pasted into whatever feed reader you use, and the reader doesn't care about it. It needn't have an extension, actually.

Another example feed can be found for the JavaRanch blogs, e.g. this one.
Susan Smith
Ranch Hand

Joined: Oct 13, 2007
Posts: 224
I see. Thanks Ulf.

What happen if let say I have this case:
1.) One item available for the reader to read. Then let say the RSS reader successfully read the item.


2.) Then, the next item available for the reader to read. Then let say the RSS reader successfully read it. Now there are two items in the RSS XML feed.


3.) Then, the description for item guid 1 changed to "lolo". So the RSS XML feed now becomes:


Will RSS reader supposedly be able to detect the change happen for item guid 1? I did some testing and use Mozilla Thunderbird RSS reader and apparently it's not working. I just want to confirm that RSS reader won't be able to detect the change unless the guid element value changes?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41079
    
  43
RSS isn't really equipped for items to change. Once you post an item, RSS should pick it up, and the reader should show it to the user. Changes made later may or may not be noticed by the reader; but that's not part of what RSS is supposed to do, so you shouldn't rely on it.

The guid definitely should not change. If the guid changes, then it's a completely new item as far as RSS is concerned.

Be sure to have a "pubDate" for each item. Most (or all) readers use time to determine whether a feed contains new items.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need to understand how RSS reader works.
 
Similar Threads
favorite feeds
RSS feed available for the Saloon
How to get only new entries in RSS via ROME
Problem with items auto change when using IE
Browser for internet..