Changeset 53737 in webkit
- Timestamp:
- Jan 22, 2010 4:43:37 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r53736 r53737 1 2010-01-22 Maciej Stachowiak <mjs@apple.com> 2 3 Reviewed by Adam Roben. 4 5 Use stale cache data when going back and forward but not using WebCore’s page cache 6 https://bugs.webkit.org/show_bug.cgi?id=33993 7 <rdar://problem/7383392> 8 9 No tests since this is a performance change. 10 11 * loader/CachePolicy.h: 12 (WebCore::): Add CachePolicyAllowStale. 13 * loader/DocLoader.cpp: 14 (WebCore::DocLoader::checkForReload): Never reload in the case of 15 CachePolicyAllowStale. 16 * loader/FrameLoader.cpp: 17 (WebCore::FrameLoader::subresourceCachePolicy): Return CachePolicyAllowStale 18 if the main resource is being loaded to allow stale data. 19 (WebCore::FrameLoader::addExtraFieldsToRequest): Use ReturnCacheDataElseLoad 20 on back/forward loads - needed when going back of forward to a page with frames. 21 1 22 2010-01-22 Kelly Norton <knorton@google.com> 2 23 -
trunk/WebCore/loader/CachePolicy.h
r39304 r53737 33 33 CachePolicyVerify, 34 34 CachePolicyRevalidate, 35 CachePolicyReload 35 CachePolicyReload, 36 CachePolicyAllowStale 36 37 }; 37 38 -
trunk/WebCore/loader/DocLoader.cpp
r48284 r53737 112 112 cache()->revalidateResource(existing, this); 113 113 break; 114 default:115 ASSERT_NOT_REACHED();114 case CachePolicyAllowStale: 115 return; 116 116 } 117 117 -
trunk/WebCore/loader/FrameLoader.cpp
r53712 r53737 2903 2903 return CachePolicyRevalidate; 2904 2904 2905 if (request.cachePolicy() == ReturnCacheDataElseLoad) 2906 return CachePolicyAllowStale; 2907 2905 2908 return CachePolicyVerify; 2906 2909 } … … 3220 3223 request.setHTTPHeaderField("Cache-Control", "no-cache"); 3221 3224 request.setHTTPHeaderField("Pragma", "no-cache"); 3222 } 3225 } else if (isBackForwardLoadType(loadType) && !request.url().protocolIs("https")) 3226 request.setCachePolicy(ReturnCacheDataElseLoad); 3223 3227 3224 3228 if (mainResource)
Note: See TracChangeset
for help on using the changeset viewer.