Lighter RSS: Only send new items, plus timestamps
by ZetaGecko | Add Your Comments | Atom/RSS
I'll begin by echoing a suggestion that has been made elsewhere before: RSS needs a mechanism to request only items that are new or updated since a particular time. Now to expand on the idea and some of the issues it brings up...
First, in case this hasn't been mentioned before, it would be good to enable requests for new AND/OR updated items. There may be instances where you don't want updated items, just new ones.
Second, the issue arises (often in conjunction with the use of the If-Modified-Since header for conditional downloads) of the fact that the server and client's clocks may not be synchronized, making it difficult to ensure that the right items are being sent in response to such a request. One solution would be for the client to include not just the cutoff time for new and/or updated items, but the current time, or the client could request any items less than some number of seconds old. I think I'd vote for that system, since that would require less calculation on the server's part.
For that matter, why not use UNIX timestamps extensively, rather than, or in addition to, human readable timestamps. Few people are going to author RSS by hand or read the raw source, so why not specify dates in the easiest format for computers to handle--a single number (or two--is a timezone required--I don't remember off hand). I imagine most feed readers reformat the timestamp into the users preferred format (which probably isn't WC3 format or anything of the kind) before displaying it anyway, so why not cut out one step of the process? Perhaps the UNIX timestamp could be added as an attribute to other date/time elements, or we could use something like <timestamp element="pubDate">7374728481</timestamp>