If-Modified-Since vs If-None-Match

Posted by Roger on Server Fault See other posts from Server Fault or by Roger
Published on 2009-08-27T19:21:32Z Indexed on 2011/11/14 17:55 UTC
Read the original article Hit count: 409

Filed under:
|

This question is based on this article

response header

HTTP/1.1 200 OK
Last-Modified: Tue, 12 Dec 2006 03:03:59 GMT
ETag: "10c24bc-4ab-457e1c1f"
Content-Length: 12195

request header

GET /i/yahoo.gif HTTP/1.1
Host: us.yimg.com
If-Modified-Since: Tue, 12 Dec 2006 03:03:59 GMT
If-None-Match: "10c24bc-4ab-457e1c1f"    
HTTP/1.1 304 Not Modified

In this case browser is sending both If-None-Match and If-Modified-Since. My question is on the server side do I need to match BOTH etag and If-Modified-Since before I send 304.

Or

Should I just look at etag and send 304 if etag is a match. In this case I am ignoring If-Modified-Since .

© Server Fault or respective owner

Related posts about apache2

Related posts about cache