This content has been marked as final. Show 3 replies
You've two choices when checking something... polling or catching events.
Since the webserver isn't going to send you an event to say it's changed, you've gone the only route possible. Check it yourself at periodic intervals.
Checking the timestamp is the quickest, which means you do not have to parse the URL.
If you want accuracy, to ensure the file has changed, even if the timestamp has not, you'd need to generate
a checksum on the URL stream contents.
But, I can't see any significant improvement on what you done...
Are you just fishing for complements !
Cheers for the reply Mate.
:) I am certainly not looking for compliments; I would rather have someone improve my code after
I do appreciate your time.
The HTTP protocol allows for a conditional GET, which will retrieve the file only if it's newer than a certain timestamp. Using that, you won't have to download the entire page each time you poll the server.