Pat Farrell wrote:Paul's answer is correct technically. That is, if the webserver responds as the RFC state, then you are set.
There is also a larger more philosophical question: how do you tell if the web page has changed if the webserver lies?
The normal way to answer this is to not trust the webserver or its dates, but to get the contents and pass the bytes through a cryptographically strong hash function such as SHA256. Compare the two hash values, and if they are different, the page is different.
John Gerso wrote:Shall i be using java.security to encrypt and decrypt the data?
John Gerso wrote:I did run into this problem. The kind of web pages I'm checking are all created dynamically which means that the creation time is always the same as the current time.
Paul Clapham wrote:
John Gerso wrote:I did run into this problem. The kind of web pages I'm checking are all created dynamically which means that the creation time is always the same as the current time.
Ah. I wouldn't have called those "web pages" then. I assumed because you called them that, they were static pages.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |