108 points · by eranation · 14y ago · 68 comments
Also worth noting that Chrome does (or at least, did) cache items even that it is explicitly told not to if they are CSS or JS which can be absolutely infuriating.
I've certainly noticed it breaking the "ctrl+f5 refreshes everything" convention in recent versions, which can be a pain when testing new code and may cause problems for users on the release of new code if you don;t vary filenames (or other parts of the request).
This is for script included using a simple <script> tag, not something that is loaded dynamically, so that isn't the cause.
The solution I've used is to either close and reopen Chrome (yep: close all windows and restart, Google is becoming the new Microsoft in this manner!) or load the script file in a different tab and hit ctrl+f5 there first (it obeys the refresh then, and updates the memory cache that other tabs are using too).
And then there's the bug in the dev channel where multiple assignment was just plain broken (bug report: http://code.google.com/p/chromium/issues/detail?id=136380)
Example:
var foo = function() { /* foo function */ };
var bar = function() { /* bar function */ };
var baz = function() { /* baz function */ };
var sup = function() { /* sup function */ };
foo.test = bar.test = baz.test = sup;
console.log(foo.test); // shows bar, not supI also use the Dev channel regularly, but I don't think it's fair to expect it to meet a high bar of quality. Typically issues are corrected within a few days.
He didn't express any anger about it, he just noted that it was broken. The anger he expresses is about Chrome's insanely aggressive caching (and every web dev I know agrees with that, even IE's caching was less over-the-top than Chrome's).
I'm taking his note on multiple assignment more as a supplementary piece of evidence re. Chrome's quality control: how can you break something as basic as multiple assignments and get that pushed to a build?
"While this build does get tested, it is still subject to bugs, as we want people to see what's new as soon as possible" and "Remember, Dev channel browsers and Canary builds may still crash frequently."
I wouldn't be surprised if the multiple assignment bug was caused by some sort of speed-related optimization.
Furthermore, it's in direct violation of the HTTP spec:
> If the request passes through a cache and the Request-URI identifies one or more currently cached entities, those entries SHOULD be treated as stale. Responses to this method are not cacheable.
As per RFC2119 (http://www.ietf.org/rfc/rfc2119.txt):
3. SHOULD This word, or the adjective "RECOMMENDED", mean that there
may exist valid reasons in particular circumstances to ignore a
particular item, but the full implications must be understood and
carefully weighed before choosing a different course.So caching DELETE is against the spec.
Should read my post as:
"Are you asking why this is bad? it is bad because..." and provided an example...
P.S. I like the Insult to injury quote, it's exactly how I felt when trying to debug it, took me an hour to figure that out...
- submitted the link in the first place
- tried to provide an explanation why this is a bad idea (i.e. wrong)
and telling you that this behavior is, in fact, not according to the specs.
Communication failure? Maybe it would help to clarify your statement a bit?
Edit: Reading a third and forth time I'm becoming less certain that _I_ got your point and the others didn't (note to self: That shouldn't be the default assumption). Did you really ask why that is bad?
Edit 2: Looking at your username and the issue comments I kind of assume that you are the commenter over at code.google.com, calling this 'severe'. So I'm back to my original assumption that you know perfectly fine why this is bad.
From http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
Section "9.1.2 Idempotent Methods". "However, it is possible that a sequence of several requests is non- idempotent, even if all of the methods executed in that sequence are idempotent."
As well section "9.7 DELETE". The last sentence: Responses to this method are not cacheable.
The same in human language: there is no guarantee that you are deleting the same object because its ID matches. E.g. MD5 collisions are rare but they sometimes happen.
Thanks for all the ones who corrected me!
Priority was bumped
"Obviously, google doesn't believe in deleting data."
Everyone on that list gets pinged whenever there is an update. This is the place to fix the bug. People should not see every single input box as an invitation to demonstrate their wit.
You can use other request methods with XMLHttpRequest. Apparently HTML5 allowed forms with PUT and DELETE for a while but this was removed from the spec.