Re: WebKit if-modified
Re: WebKit if-modified
- Subject: Re: WebKit if-modified
- From: Andrew Bush <email@hidden>
- Date: Fri, 8 Dec 2006 11:16:32 +1300
Thanks guys, sparkle looks interesting and phillips suggestion of a
plist is a nice, clean solution :)
Yours cheerfully,
Andrew Bush
On 8, Dec 2006, at 1:00 AM, Philip Q wrote:
On 07/12/06, Andrew Bush <email@hidden> wrote:
Now what I would like to do though is first check a website to see if
there exists a newer version of the html pages in question, and if
they
exist download and use them instead, otherwise default to either the
most recently downloaded version or the bundled version if all else
fails.
I'm pretty sure there's nothing built-in that will automatically do
this for you, but it should be pretty simple to ping a site to see if
there's an updated version.
The easiest way I can think of would be to store a plist on the server
with references to the files and their latest versions. Being a plist
makes it trivial to retrieve and load into a dictionary without every
leaving NSDictionary (see: +dictionaryWithContentsOfURL:).
You've have to do the comparisons then load/save the latest versions,
but that's not hard either (pretty much 2 calls with NSData, but you
might want to do some error-chehcking).
-Phil
_______________________________________________
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