Comment #10 on issue 23162 by getify: Cache ignored on page-refresh for  
some dynamic scripts with cache-headers
http://code.google.com/p/chromium/issues/detail?id=23162

I still feel like I'm not making my question clear, so that's my fault. I  
realize
this is a confusing scenario, so let me try one more time with some more  
concrete
examples. I probably should have just initially asked my question this way,  
as
hopefully it will clearly illustrate where the quirk is happening.


Page View 1 (initial page view in Chrome)
a) Download "script1.php?3333" with type "text/javascript"
b) Download "script2.php?5555" with type "script/cache"
c) Re-attempt download of "script2.php?5555" with type "text/javascript"


Page View 2 (refresh of page view in Chrome)
a) Download "script1.php?7777" with type "text/javascript"
b) Download "script2.php?9999" with type "script/cache"
c) Re-attempt download of "script2.php?9999" with type "text/javascript"

----------

Notice how 1b and 1c have the SAME URL as each other... meaning the browser  
should
be able to pull from cache of 1b for 1c

Also notice how 2b and 2c have the SAME URL (same as each other, but  
obviously
different from 1b and 1c)... meaning the browser should be able to pull  
from cache
of 2b for 2c.

----------

What actually happens:

* browser does a full request for 1b, but pulls from cache for 1c. -- Good!

* browser does a full request for 2b, but cannot pull from cache for 2c, so  
must
full download again. -- Bad!

----------

2b and 2c have same URL as each other, why is the cache INVALID for 2c?  
Moreover,
why is the cache VALID for 1c but INVALID for 2c?

The difference between 1 and 2 is really why I'm claiming a bug. In my  
mind, there
shouldn't be a difference in how the browser treats 1 and 2, because both  
start with
freshly generated dynamic URL's (to keep the test clean).

1b should result in a valid cache for 1c, and it does! But by the same  
logic, 2b
should result in a valid cache for 2c, but it doesn't. :(

***I understand*** that my .php scripts are not sending out an Etag or  
last-modified
header. But that still hasn't explained to me sensibly why behavior is  
different
between 1 and 2, since the same headers get sent in both cases.

----------

Other things to note about the quirky/buggy behavior:

1. if the URL's are ".js" instead of ".php", then BOTH 1c and 2c find valid  
cache
hits.

2. if there are no ?xxxx type parameters added to the above URL's (but you  
clear the
cache after initial page load before hitting "refresh"), then BOTH 1c and  
2c find
valid cache hits.

3. if 1b, 1c, 2b, and 2c all happen AFTER their respective page loads, then  
BOTH 1c
and 2c find valid cache hits.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

-- 
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs

Reply via email to