NSURLRequest caching and conditional GET
NSURLRequest caching and conditional GET
- Subject: NSURLRequest caching and conditional GET
- From: Henrik Nyh <email@hidden>
- Date: Sat, 06 Jan 2007 18:51:57 +0100
Hullo,
I am implementing a HTTP conditional GET using
NSURLRequest/NSMutableURLRequest.
I found that with default caching, I would constantly get a 200 response
(rather than 304) even when sending If-Modified-Since and If-None-Match
headers that correspond to the Last-Modified and ETag values. The server
logs suggest the request didn't go remote.
Turning off caching gives the correct 304 response.
The mailing list post
http://lists.apple.com/archives/Cocoa-dev/2004/Sep/msg00868.html
suggests the default caching might use If-Modified-Since. Is that true?
I guess my actual question is: if I want to make conditional GETs, could
I just rely on default caching and not include
If-Modified-Since/If-None-Match headers? Does that pretty much amount to
a conditional GET? Or should I disable caching?
--
Henrik Nyh
http://henrik.nyh.se
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden