[Webkit-unassigned] [Bug 89230] Add support for application cache prefer-online mode

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 30 02:20:47 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=89230





--- Comment #16 from huangxueqing <huangxueqing at baidu.com>  2012-08-30 02:20:52 PST ---
(In reply to comment #14)
> There's another aspect of prefer-online that I'm not sure is covered in this patch. How are the contents of the appcache utilized for subresource loads in this case?
> 
I'm sorry i did not understand you means totally. Do you means this patch how to affect subresource fetching? If so, as spec said, "prefer-online" only change navigation, this patch did not change any behavior of subresource.

> > > Something may not be right here. I think a resource for the new location may be contained in a different appcache, but this logic will not pick that appcache up and is expecting to find the a resource for the new location in m_mainResourceApplicationCache. But if/when that resource is not found, line 93 will crash.
> > > 
> > This modification just avoid to retrive cache for request repeatly since this cache maybe loaded before MainResourceLoader fetch the resources from network.
> 
> Maybe I'm confused... but... when this is invoked a 2nd time via the callsite in maybeLoadMainResourceForRedirect(), request->url() will have a different value corresponding to the location of the redirect (right?). Theres is no guarantee that the cache identified on the first invocation (with the original url) will contain a resource for this new url, and there may actually be another cache that contains a resource for that new url.
> 
Yes, you're right, thanks for remind, we should reset m_mainResourceApplicationCache before retrieve appcache for redirected request, it try to load from appcache always fail since appcache's mode was 'prefer-online'. I had changed it.

> > 
> > > Not sure these changes should be here. This method affects subresource loads which should not be affected by the prefer-online setting.
> > > 
> > XHR load a master entry synchronously should be affected by the prefer-online setting.
> 
> XHR always performs subresource loads, "main" vs "sub" is not function of the resource being loaded, its a function of how its being loaded. 
> 
Oh~, do you means even if XHR load a "**.html" should treat as subresource? It seems reasonable, alright, i removed this piece of code.

> > > After reading the spec, looks like the test for 'Master' should not be here, but a test for 'Foreign' should be here such that 'Foreign' entries will be excluded.
> > As mentioned above, a cache included 'Foreign' resource never be picked up, therefore, I think it's fine that we use ASSERT instead of it.
> 
> Great, maybe we can ASSERT(!Foreign) here then. But still, I don't see where the test for 'Master' is correct. An explicitly listed resource that's not a 'Master' can also be navigated to and an appcached resource should be utilized in that case too.
Consider 'a' html file was listed in 'b' manifest file, 'a' has included another manifest 'c', that implicit 'a' was marked as 'Foreign' in 'b', appcache identified by 'b' nerver be picked up;
If 'a' has not include any manifest file, this seem not specified in spec, in current implementation, 'a' will be picked up since 'a' was 'Explicit' in b. Therefore, I did not prefer to add a test for this.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list