Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: loadHTMLString caching problems



Hi Alan,

This sounds like a bug I reported last year:

http://bugs.webkit.org/show_bug.cgi?id=14665

I reported it to Apple too, it has ID 5315820.

As far as I can tell, nobody cares. ;-)

I looked at the code and couldn't figure out how to get the behavior that I thought was correct.

I worked around this by resolving all of my resource references in the page at the time that I render the page markup. That works, but it means that I have to walk the DOM and look at every node, identify all of them that can contain resource references, and resolve the references the same way I would do if my willSendRequest delegate were called. It costs me more time to parse and walk the DOM, and I have this uneasy feeling that I might miss some element type that contains a resource reference. I'd rather rely on the browser control to find them for me and call my delegate.

- Rush

Alan Shouls wrote:
Hi Darin

I have been trying to Google my way out of my problems and I came across a reply that you posted to somone who seemed to be having the same problems as me in 2003 http://lists.apple.com/archives/webkitsdk-dev/2003/Dec/msg00009.html

<-- snip -->

 >[[myWebView backForwardList] setPageCacheSize:0];

This affects only the back/forward cache, which controls caching of entire web pages so that you can do a "go back" faster. That's not what's happening here.

 >[modReq setCachePolicy:NSURLRequestReloadIgnoringCacheData];

This controls the Foundation URL loading caching.

 >What am I missing?

The caching that's causing you trouble is the caching done in WebCore. This cache is not properly expiring things. And this caching happens before you get a willSendRequest: callback.

This is a bug in WebKit, and I don't know of a workaround. We plan to fix the WebCore cache expiration in the next Safari update.

<-- snip -->

Could you tell me if this is indeed the (same) bug that is affecting me.

Best regards

Alan Shouls

Hi

I have had some problems posting this to the list - but it seems to have worked.

I should say that in a modified form of

-(NSURLRequest *)webView:(WebView *)sender
        resource:(id)identifier
     willSendRequest:(NSURLRequest *)request
    redirectResponse:(NSURLResponse *)redirectResponse
      fromDataSource:(WebDataSource *)dataSource


I have also tried making copies of the images specified request, so they are uniquely named on the fly and in the /tmp directory and changed the response so that it 'points' to them. Still the cache refuses to release it's grip

Alan

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webkitsdk-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webkitsdk-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: loadHTMLString caching problems (From: Alan Shouls <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.