[bfcache] Only cache main frame if last commit was an HTTP GET.
We only want to add pages to the cache if the initial fetch is expected to have had no side effects on the server (HTTP GET). Before this CL, we could cache pages that were the result of an HTTP POST. There are two main cases we need to handle: 1) The last commit's http method != GET (e.g. POST): We should not cache. 2) The last commit's http method == GET: We should cache the page, if it is otherwise eligible for caching. An HTTP POST may result in a redirect, or chain of redirects, however for caching purposes we only care about the last commit in the chain of redirects (if the last commit was a successful GET, we can cache the page. Otherwise, we cannot). TBR=clamy@chromium.org Change-Id: I475eb73bf5ac50f500d760df5a947b2a8e1f5e4a Bug: 1014901 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1864681Reviewed-by:Lowell Manners <lowell@chromium.org> Reviewed-by:
Hajime Hoshi <hajimehoshi@chromium.org> Reviewed-by:
Alexander Timin <altimin@chromium.org> Reviewed-by:
Arthur Sonzogni <arthursonzogni@chromium.org> Commit-Queue: Lowell Manners <lowell@chromium.org> Cr-Commit-Position: refs/heads/master@{#706874}
Showing
Please register or sign in to comment