Index: Source/core/fetch/ResourceFetcher.cpp |
diff --git a/Source/core/fetch/ResourceFetcher.cpp b/Source/core/fetch/ResourceFetcher.cpp |
index 7df5fd157395b48b3b5fe739197e389275547e59..aff41de2923c392a31216dd42a7a5d5763a0533e 100644 |
--- a/Source/core/fetch/ResourceFetcher.cpp |
+++ b/Source/core/fetch/ResourceFetcher.cpp |
@@ -572,10 +572,6 @@ ResourceFetcher::RevalidationPolicy ResourceFetcher::determineRevalidationPolicy |
if (existingResource->isPreloaded()) |
return Use; |
- // Defer to the browser process cache for Vary header handling. |
- if (existingResource->hasVaryHeader()) |
- return Reload; |
- |
// CachePolicyHistoryBuffer uses the cache no matter what. |
CachePolicy cachePolicy = context().cachePolicy(); |
if (cachePolicy == CachePolicyHistoryBuffer) |
@@ -637,6 +633,10 @@ ResourceFetcher::RevalidationPolicy ResourceFetcher::determineRevalidationPolicy |
if (type == Resource::Image && existingResource == cachedResource(request.url())) |
return Use; |
+ // Defer to the browser process cache for Vary header handling. |
+ if (existingResource->hasVaryHeader()) |
+ return Reload; |
+ |
// 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"); |