Detecting new new items in a RSS feed Detecting new new items in a RSS feed xml xml

Detecting new new items in a RSS feed


Each item in RSS 2 and Atom has a GUID/ID that may be flagged as unique. If it's flagged as unique you can use it to identify items and match against the previous items.


Check the Last-Modified and ETag fields of the http response when requesting the field. Even better, use the If-Modified-Since and If-None-Match tags in your request, and you will only get a 304 response if the feed hasn't been modified. (see: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html)


I am using etags on my project, computed in a servlet filter as shown here http://www.infoq.com/articles/etags

This would work for rss, atom or any other resource hosted on your webserver.