Index: Source/core/fetch/ResourceFetcher.cpp |
diff --git a/Source/core/fetch/ResourceFetcher.cpp b/Source/core/fetch/ResourceFetcher.cpp |
index 7df5fd157395b48b3b5fe739197e389275547e59..a5207ec197048ef824733c296ce550e812535749 100644 |
--- a/Source/core/fetch/ResourceFetcher.cpp |
+++ b/Source/core/fetch/ResourceFetcher.cpp |
@@ -572,6 +572,11 @@ ResourceFetcher::RevalidationPolicy ResourceFetcher::determineRevalidationPolicy |
if (existingResource->isPreloaded()) |
return Use; |
+ // List of available images logic allows images to be re-used without cache validation. We restrict this only to images |
+ // from memory cache which are the same as the version in the current document. |
+ if (type == Resource::Image && existingResource == cachedResource(request.url())) |
Nate Chapin
2015/08/14 23:33:39
Moved here to make it equivalent to preloading. I'
|
+ return Use; |
+ |
// Defer to the browser process cache for Vary header handling. |
if (existingResource->hasVaryHeader()) |
return Reload; |
@@ -632,11 +637,6 @@ ResourceFetcher::RevalidationPolicy ResourceFetcher::determineRevalidationPolicy |
return Reload; |
} |
- // List of available images logic allows images to be re-used without cache validation. We restrict this only to images |
- // from memory cache which are the same as the version in the current document. |
- if (type == Resource::Image && existingResource == cachedResource(request.url())) |
- return Use; |
- |
// If any of the redirects in the chain to loading the resource were not cacheable, we cannot reuse our cached resource. |
if (!existingResource->canReuseRedirectChain()) { |
WTF_LOG(ResourceLoading, "ResourceFetcher::determineRevalidationPolicy reloading due to an uncacheable redirect"); |