[Webkit-unassigned] [Bug 35883] New: Buggy caching of .js/.css resources

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 8 15:22:18 PST 2010


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

           Summary: Buggy caching of .js/.css resources
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
               URL: http://test.getify.com/chrome-cache-bug-2/
        OS/Version: Windows XP
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: New Bugs
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: getify at gmail.com


[NOTE: I'm re-posting this bug here. It was originally filed in the Chromium
bug tracker http://code.google.com/p/chromium/issues/detail?id=37711 but it now
appears to be Webkit related]


Bug Statement:
Across shift+refreshes, or even cache clearings, the color #1 and number #1
always 
reload/change (as expected). but color #2 and number #2 persist from load to
load. 
until you navigate away and come back, which resets the special caching state.

i verified that "script2.js" and "css2.css" *are* removed from the cache when
clearing 
the cache. But yet they still remain in some sort of special cache state and
persist.


What steps will reproduce the problem?
1. Go to the above testing URL (http://test.getify.com/chrome-cache-bug-2/)
2. Notice the first number and background color that appear immediately
3. After 3 seconds, notice the second number, and the new background color
4. Shift-Refresh the page, notice the first number and color change, but 
after 3 seconds, the second number and color are the same as before the 
refresh.
5. Clear the browser cache, refresh the page. Notice same behavior as in 
#4.

What is the expected result?
That scripts and css that are loaded dynamically after page load will go 
normally into the cache, and therefore be removed from the cache when it is 
cleared or when a shift-refresh occurs.

What happens instead?
scripts and css that are loaded at page load time behave correctly in the 
cache. but, scripts and css that are loaded later (after the 3 seconds), go 
into some special cache state, where they cannot be cleared by normal 
means. They will persist even if the file changes on the server, or even if 
 the cache is cleared through any of several methods.

Please provide any additional information below. Attach a screenshot if
possible.

The test at the URL above is designed in this way:

1. First, it loads a single script file ("script1.js") and a single css 
file ("css1.css"), both immediately during page load. The CSS file sets the 
background color of the log textarea, and the JS file adds a message to the 
log with a random number generated on the server.

2. It then sets a timeout of 3 seconds, at which time it loads another 
script file ("script2.js") and another css file ("css2.css"). You will then 
notice the second message in the log box, and the color change.

Now, at this point, there should be 4 files in the cache, two .js files and 
two .css files. If I do a shift-refresh, or I clear the cache manually 
(shift+ctrl+delete), I would expect all 4 files to be cleared out.

On refresh of the page after clearing/invalidating the cache, the first 
script and css file DO reload with their new version. But after 3 seconds, 
the browser loads the previous version of "script2.js" and "css2.css". This 
happens persistently no matter how you try to clear the cache or shift-
refresh, it will keep those versions around.

The only way to truly clear these specially (incorrectly) cached items is 
to physically navigate away from the URL and then come back, at which point 
it will reload all 4 files. But then it goes right back to keeping 
"script2.js" and "css2.css" in that special cache state until another 
navigation away.

-- 
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