Re: Downloading files via HTTP with 304 support?
Re: Downloading files via HTTP with 304 support?
- Subject: Re: Downloading files via HTTP with 304 support?
- From: Kevin Ballard <email@hidden>
- Date: Thu, 23 Sep 2004 02:57:44 -0400
On Sep 23, 2004, at 2:49 AM, Scott Anguish wrote:
NSURLRequest is rather lightweight, otherwise the it'd be the init
method from hell.. NSMutableURLRequest allows you to do that
http://developer.apple.com/documentation/Cocoa/Reference/Foundation/
ObjC_classic/Classes/NSMutableURLRequest.html
Oh thanks, I didn't think to look at the mutable one since I don't
generally expect mutable ones to provide any extra functionality not
related to simply mutating existing values. I guess I should have
looked anyway. That should do what I need.
You could probably take advantage of the built in caching, actually.
"NSURLRequestUseProtocolCachePolicy" uses the If-Modified-Since
header.
http://developer.apple.com/documentation/Cocoa/Conceptual/
URLLoadingSystem/Concepts/CachePolicies.html
I doubt it. I want to store a local copy of the downloaded file and
simply remember the last modified time in prefs. I'd rather not
re-download the file when it expires from the cache.
Maybe if I explain what this is for it will make sense. I'm trying to
make Rendezvous Browser (http://www.tildesoft.com) be able to download
new known services automatically rather than forcing me to put out an
updated version of the program simply for new service names. I figure
the best way to achieve this is to have a local plist with the known
services, and just check to see if an updated version is available from
my website on each launch. If a new version is available it will
download it and use that instead, otherwise it will continue to use the
local copy. The desire for the 304 response is so I don't keep serving
out long plists to people launching Rendezvous Browser when they most
likely already have the latest version.
Anyway, thanks for the pointers. I'll see if I can get this to work.
--
Kevin Ballard
email@hidden
http://www.tildesoft.com
http://kevin.sb.org
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden