Comment #9 on issue 23162 by [email protected]: Cache ignored on page-refresh for some dynamic scripts with cache-headers http://code.google.com/p/chromium/issues/detail?id=23162
ref comment#7: 1. I don't see why should that matter. In fact, I have been ignoring the request related to script1.php because I don't see anything weird with them. As a semi- related note, if you load three times script2.php instead of twice, you should see that the third load doesn't hit the server on refresh. Just the first two loads. 2. No idea about the data type. Having dynamic parameters of course means that each time we treat them as different resources, completely unrelated with the script received during a previous step. 3. The issue here is that the "normal" path for a request is not a result of the user explicitly refreshing the current page. A regular navigation just sees if the cached resource can be used or not, and given that the expiration date is still in the future, the cached script is just reused (and that goes for clicking on a button). However, if the user hits F5, the request is treated as "make sure that I have the most recent version of this page", so we'll try to fully re-validate everything, but we can't because we don't have a "signature" for the resource (date or etag), so we have to discard the cached version and ask the server. It looks like asking for the script again from the same page is treated as part of the same user action (i.e. another resource from this page must be revalidated), so the script that was just downloaded is discarded again because we cannot re-validate it... and you see two requests hitting the server. If this were just a button on the page, there is no intention to make sure that everything is as fresh as possible, so the cached version would just be reused. 4. Actually, I just answered this one :) One refresh equals two loads that must revalidate the content (with the caveat that there is a list or URLs that were already revalidated). -- 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
