Topic: Unable to get a 304

Hi,
I am trying to reach a server and check if content has changed since last time. However I keep getting a 200 instead of 304, the second time as well.

url=URI.parse('http://www.msnbc.msn.com/js/std.js')
cd=Net::HTTP.start(url.host,url.port)
request = Net::HTTP::Get.new(url.request_uri)
response = cd.request(request)
request['HTTP_IF_NONE_MATCH']=response['Etag']
response = cd.request(request)

Should I be doing something else?
Thanks for your time.

Deepa.

Re: Unable to get a 304

Since it's the server which is building a response for you to read, it could be the server's responsibility...

Re: Unable to get a 304

Thanks for the reply. http://www.msnbc.msn.com/js/std.js returns 304 on second request when I tested in firefox.

Last edited by t.deepa (2010-11-19 18:25:19)