Changeset 93326 in webkit


Ignore:
Timestamp:
Aug 18, 2011 11:41:28 AM (13 years ago)
Author:
simonjam@chromium.org
Message:

Revalidate expired resources if they're requested after the initial document load
https://bugs.webkit.org/show_bug.cgi?id=52153

Reviewed by Antti Koivisto.

Source/WebCore:

Test: http/tests/cache/subresource-multiple-instances.html

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::determineRevalidationPolicy):

LayoutTests:

  • http/tests/cache/subresource-multiple-instances-expected.txt: Added.
  • http/tests/cache/subresource-multiple-instances.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r93325 r93326  
     12011-08-18  James Simonsen  <simonjam@chromium.org>
     2
     3        Revalidate expired resources if they're requested after the initial document load
     4        https://bugs.webkit.org/show_bug.cgi?id=52153
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * http/tests/cache/subresource-multiple-instances-expected.txt: Added.
     9        * http/tests/cache/subresource-multiple-instances.html: Added.
     10
    1112011-08-18  Tony Chang  <tony@chromium.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r93316 r93326  
     12011-08-18  James Simonsen  <simonjam@chromium.org>
     2
     3        Revalidate expired resources if they're requested after the initial document load
     4        https://bugs.webkit.org/show_bug.cgi?id=52153
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Test: http/tests/cache/subresource-multiple-instances.html
     9
     10        * loader/cache/CachedResourceLoader.cpp:
     11        (WebCore::CachedResourceLoader::determineRevalidationPolicy):
     12
    1132011-08-18  Anders Carlsson  <andersca@apple.com>
    214
  • trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp

    r92143 r93326  
    475475    }
    476476
    477     // Avoid loading the same resource multiple times for a single document, even if the cache policies would tell us to.
    478     if (m_validatedURLs.contains(existingResource->url()))
     477    // During the initial load, avoid loading the same resource multiple times for a single document, even if the cache policies would tell us to.
     478    if (!document()->loadEventFinished() && m_validatedURLs.contains(existingResource->url()))
    479479        return Use;
    480    
     480
    481481    // CachePolicyReload always reloads
    482482    if (cachePolicy() == CachePolicyReload) {
Note: See TracChangeset for help on using the changeset viewer.