WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
34969
[chromium] expose cache-bypass flag in reload() API
https://bugs.webkit.org/show_bug.cgi?id=34969
Summary
[chromium] expose cache-bypass flag in reload() API
Evan Martin
Reported
2010-02-16 01:19:14 PST
[chromium] expose endToEnd flag in reload() API
Attachments
Patch
(2.45 KB, patch)
2010-02-16 01:20 PST
,
Evan Martin
no flags
Details
Formatted Diff
Diff
https://bugs.webkit.org/show_bug.cgi?id=34969
(2.50 KB, patch)
2010-02-17 02:28 PST
,
Evan Martin
no flags
Details
Formatted Diff
Diff
https://bugs.webkit.org/show_bug.cgi?id=34969
(2.51 KB, patch)
2010-02-17 11:30 PST
,
Evan Martin
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Evan Martin
Comment 1
2010-02-16 01:20:05 PST
Created
attachment 48794
[details]
Patch
Evan Martin
Comment 2
2010-02-16 01:21:05 PST
This patch requires a patch on the Chrome side as well. Advice welcome on the best way to land it.
Evan Martin
Comment 3
2010-02-16 01:36:54 PST
Chrome-side change:
http://codereview.chromium.org/605026/show
Darin Fisher (:fishd, Google)
Comment 4
2010-02-16 23:16:25 PST
I'm not sure that "end to end" is the right name here. reload(false) means send Cache-control: max-age=0, which means "end-to-end validation" reload(true) means send Cache-control: no-cache, which means "end-to-end refetch" Both cases are end-to-end in other words. I think the parameter to FrameLoader::reload is similarly misnamed. This is spelled out in section 14.9.4 of RFC 2616.
Evan Martin
Comment 5
2010-02-17 02:11:27 PST
Here's the code in FrameLoader: if (loadType == FrameLoadTypeReload) { request.setCachePolicy(ReloadIgnoringCacheData); request.setHTTPHeaderField("Cache-Control", "max-age=0"); } else if (loadType == FrameLoadTypeReloadFromOrigin) { request.setCachePolicy(ReloadIgnoringCacheData); request.setHTTPHeaderField("Cache-Control", "no-cache"); request.setHTTPHeaderField("Pragma", "no-cache"); endToEnd=true causes the second loadtype: loadWithDocumentLoader(loader.get(), endToEndReload ? FrameLoadTypeReloadFromOrigin : FrameLoadTypeReload, 0); You worried about the effects of using ReloadIgnoringCacheData in the the review: "I'm afraid that if it is also setting ReloadIgnoringCacheData that our disk cache will be evicted even for an otherwise conditional request" but I don't know enough about this code to know what the effects of it are. Here's the text of the RFC: End-to-end reload The request includes a "no-cache" cache-control directive or, for compatibility with HTTP/1.0 clients, "Pragma: no-cache". Field names MUST NOT be included with the no-cache directive in a request. The server MUST NOT use a cached copy when responding to such a request. Specific end-to-end revalidation The request includes a "max-age=0" cache-control directive, which forces each cache along the path to the origin server to revalidate its own entry, if any, with the next cache or server. The initial request includes a cache-validating conditional with the client's current validator. Because "end to end reload" is the wording used in the RFC, I can see where the WebKit name came from. But I agree that it is very confusing. From your other mails I saw these suggestions: LOAD_VALIDATE_CACHE / LOAD_BYPASS_CACHE RELOAD_VALIDATING_CACHE / RELOAD_IGNORING_CACHE I will arbitrarily go with ignoreCache and upload another patch.
Evan Martin
Comment 6
2010-02-17 02:28:26 PST
Created
attachment 48876
[details]
https://bugs.webkit.org/show_bug.cgi?id=34969
Evan Martin
Comment 7
2010-02-17 11:30:29 PST
Created
attachment 48918
[details]
https://bugs.webkit.org/show_bug.cgi?id=34969
Evan Martin
Comment 8
2010-02-17 11:31:25 PST
Last patch just adds a default arg to reload(), so that this can be rolled into Chrome without needing to synchronize the change Chrome-side.
Eric Seidel (no email)
Comment 9
2010-02-17 16:36:53 PST
Comment on
attachment 48918
[details]
https://bugs.webkit.org/show_bug.cgi?id=34969
OK. In FrameLoader it appears to be: void reload(bool endToEndReload = false);
Darin Fisher (:fishd, Google)
Comment 10
2010-02-17 16:54:23 PST
r=me too
WebKit Commit Bot
Comment 11
2010-02-17 21:38:33 PST
Comment on
attachment 48918
[details]
https://bugs.webkit.org/show_bug.cgi?id=34969
Clearing flags on attachment: 48918 Committed
r54928
: <
http://trac.webkit.org/changeset/54928
>
WebKit Commit Bot
Comment 12
2010-02-17 21:38:38 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug