On 20/06/2012, at 5:42 PM, 尹佳冀 <yinjiaji...@gmail.com> wrote:

>> The UIWebView sees the nil return (ie nothing cached) and so proceeds to 
>> load the URL itself. So now I have two processes loading the same URL: The 
>> web view and the custom caching mechanism

> In this case you return a fake data, like <pre>fakeData = [[NSData 
> dataWithBytes:" " length:1] retain];</pre>, webview will no to load this url, 
> does this solution can help you?

Thanks for your answer.

True, if I feed empty data (ie not a nil) back to the web view from the cache 
request, the web view won't continue to load the URL. However, unless I can 
then ask the web view to instead load the cached version (after it downloads), 
I just get a blank web page. Since the URL also spawns other URL requests (eg 
images, javascript, CSS, redirects), they won't be loaded at all unless the web 
view loads the parent resource.

Any other ideas?

Thanks,
Tom


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to