Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RSS items order, does it matter?

I created an RSS feed with Java Rome lib. The project is near the end. But I found strange behavior in some RSS clients.

I think it's more of an RSS clients' problem, but I want to make sure.

Rome holds items in a List, so the latest items are at the end of the list. I opened my feed in my RSS clients (Firefox and RSS Bandit) and I found they are in reversed order (technically it's chronological, but reversed compared to the order I used).

I thought it's an RSS client bug (I usually use Google Reader), but I checked some feeds on the Internet and saw that reason that they display correctly is they have reverse ordered items (oldest on the top).

But XML parsers shouldn't rely on item order. Why do RSS clients use item order instead of dates for sorting items?

And, most importantly, should I reorder my items list?

Edit: I found an easy solution:

     entries.add(0,entry); // :-)

But the question about "correct" client behavior remains.

like image 444
Maciek Sawicki Avatar asked Dec 02 '09 04:12

Maciek Sawicki


1 Answers

One of the underlying problems of RSS is that there really isn't a single standard whose field usage is well-defined. I would worry much more about what clients and servers actually seem to do, not what you think a spec theoretically tells them to do...

like image 190
Neil Coffey Avatar answered Sep 23 '22 14:09

Neil Coffey