Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Way to get Chrome to always re-download styles and images on every visit to the page during development/testing?

As brilliant as Firebug is, I would consider switching my JavaScript debugging to Chrome if I could figure out how to get it to always re-download styles and images on every visit to the page?

When I'm testing a page in Firefox, it always gets the latest version.

But in Chrome I often end up scratching my head over something that turns out to be a simple issue of the browser caching some earlier styles or images.

Is there a way to configure Chrome to cache less while you're developing?

like image 281
wiki Avatar asked Oct 26 '10 22:10

wiki


3 Answers

I often use private browsing mode for this - it prevents caching of the stylesheets or scripts.

EDIT:

Another really easy way to do this in Chrome now is to go into the Chrome Developer Tools, click the settings gear (bottom right), and then check "Disable cache." See https://stackoverflow.com/a/7000899/4570.

like image 123
David Mohundro Avatar answered Oct 05 '22 13:10

David Mohundro


A bit late to the party, but just for people who may pick up this page on a search, new versions of Chrome have a developers tools setting to disable the cache. Show developer tools (spanner->tools->developer tools) and on the bottom right is a tiny little gear. click that and a few settings appear in the developer tools window, one of which is to disable the browser cache. If you can't see it you may have to upgrade to a newer version of chrome.

Ian

like image 30
Ian Rolfe Avatar answered Oct 05 '22 12:10

Ian Rolfe


According to Chrome help pages, Ctrl+F5, Shift+F5, Ctrl+R and Shift+R should force refresh. I haven't had problems with javascript and css but refreshing frames is another story. The caching can also be on your web server. The server can obviously be configured to cache css and javascript files.

like image 32
bjorsig Avatar answered Oct 05 '22 13:10

bjorsig