I want to check for updates on a RSS feed. Is there any way to do it without downloading the complete XML? (want to minimize data transfer...)
Thanks
I want to check for updates on a RSS feed. Is there any way to do it without downloading the complete XML? (want to minimize data transfer...)
Thanks
Depending on the source you're looking at, it should be possible to do a head request and check the last modified date. You would have to keep track of the last time you updated on your end, but if the main thing you're worried about is total bandwidth usage, I think this is probably your best bet, although you'd would still have to make a normal request to get the actual file if you detected that the new last modified date is after your saved version.
Methods of performing a head request for a URL will differ depending on the language that you're using.
A quick example in .NET
HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
// instruct the server to return headers only
request.Method = "HEAD";
// make the connection
response = request.GetResponse() as HttpWebResponse;
// get the headers
headers = response.Headers;
If you have control of the feed you're requesting, you can ensure that it includes ETags to compare with last request - your best option. Read this: http://www.kbcafe.com/rss/rssfeedstate.html