6 ms·
Chrome's excessive caching is so broken for RESTful web services that I've just given up on letting it cache any requests from Javascript. It completely ignores
by T-R 14y ago
Chrome's excessive caching is so broken for RESTful web services that I've just given up on letting it cache any requests from Javascript. It completely ignores Vary headers, too, so hitting the back button after an AJAX request to the same URL (but with a different content-type) as a visited page displays the AJAX response (e.g., JSON) instead of the page. Worse yet, it's been marked as WONTFIX.
http://code.google.com/p/chromium/issues/detail?id=94369 http://code.google.com/p/chromium/issues/detail?id=94369
- why-el 14y agoDo you have issues when developing? I have spent hours diving in my code thinking something is up before realizing it's just Chrome caching thats ignoring my changes!
- Gigablah 14y agoYeah, I have issues with Chrome caching my JS template files as well... shift-refreshing the files themselves shows the changes, but it has no effect on ajax requests.
- pasbesoin 14y agoThat's another annoying part of it for me -- or was, the last time I was doing web development a year and something ago. Getting Chrome to flush some of its caches can difficult / require "extreme" measures. (Favicons were amongst the most egregious hangers on, in what I was doing. Not a "big" problem, but very annoying.)
- lucisferre 14y agoThe Chrome developer tools have an option to turn of the cache, I never use it without that enabled. Or any other browser for that matter.
- why-el 14y agoYep, that's what I ended up doing.
- ZoFreX 14y agoI don't think it's really fair to brag that your browser is the fastest when it willfully breaches the HTTP spec just to appear better than the competition. Is Chrome really better than IE, from an intentions viewpoint? 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.
- dspillett 14y ago> 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).
- mjdwitt 14y agoI may be mistaken, but I believe that Chrome uses ctrl+shift+R to refresh everything.
- idupree 14y agoIt's "Ctrl-Shift-R twice". Hit it, wait a few moments for the page to start reloading, then hit it again. Otherwise it doesn't reload everything. Verify this by watching the Developer Console's Network section. I can only assume this is intentional; my coworkers told me this trick last year and it still seems to be the case.
- SquareWheel 14y ago