Re: WebKit if-modified
Re: WebKit if-modified
- Subject: Re: WebKit if-modified
- From: Rush Manbert <email@hidden>
- Date: Thu, 07 Dec 2006 09:59:24 -0800
Andrew Bush wrote:
Hi all,
Im using the webkit to display some html that is bundled with my
application..thats working nicely (thanks apple)
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.
does anyone have any thoughts on the best way to accomplish this?
should I try and use the webkit delegate methods to intercept the
request and check there myself? can I setup webkit to do it
automatically? should I download the files separately first and then
simply move them to where webkit is loading the html from? (for my
purposes it doesn't matter much /when/ the user gets the newer pages, so
downloading them during one application run and displaying them in the
next is perfectly fine).
has anyone tackled this before or have any suggestions on the best way
to accomplish it?
for my purposes less complex is probably more important than timely
updates :)
thanks for any help.
Hi Andrew,
It will be a lot simpler if you just check for a new version and
download it to the place where your app gets it, then display the new
version the next time. I know from experience that it can get tricky
when you start intercepting the requests in the delegate callbacks.
If you decide to ignore this advice, then you probably need to intercept
the request in the resource load delegate willSendRequest method. When
you see the request of interest, you can probably download the new
version before you return and the resource load actually starts. Of
course, then you need to worry about caching...I wouldn't start down
this road if you can avoid it.
- Rush
_______________________________________________
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