[Webkit-unassigned] [Bug 53161] New: max-age without ETag nor Last-Modified should use cache validator

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 25 23:29:07 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=53161

           Summary: max-age without ETag nor Last-Modified should use
                    cache validator
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Mac OS X 10.6
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Page Loading
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: Tam at SiuLung.com


Nowadays it is a common pattern to use "?timestamp=UNIX_TIMESTAMP" in combination of "Cache-Control: max-age=INFINITY" response headers to denote scenarios where HTML or JavaScript knows that the resource we are retrieving has not been changed since UNIX_TIMESTAMP, so the browser should not attempt to revalidate the resource anyhow, including If-Modified-Since or If-None-Match requests.

Currently WebCore/loader/cache/CachedResourceLoader.cpp says:
    // Check if the cache headers requires us to revalidate (cache expiration for example).
    if (existingResource->mustRevalidateDueToCacheHeaders(cachePolicy())) {
        // See if the resource has usable ETag or Last-modified headers.
        if (existingResource->canUseCacheValidator())
            return Revalidate;
        // No, must reload.
        LOG(ResourceLoading, "CachedResourceLoader::determineRevalidationPolicy reloading due to missing cache validators.");
        return Reload;
    }

This kind of responses has canUseCacheValidator() == FALSE, so it returns Reload.
I expect it somehow returns Use, so that MemoryCache is reused as long as the resource is still fresh (i.e. max-age not yet elapsed).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list