5

Possible Duplicate:
How to force refresh without cache in Google Chrome?

I do a lot of development on my local machine and would like to start using Chrome, however I cannot seem to do a hard-refresh (ctrl+f5) or any other key combination to get my browser to forcibly refresh all content @ http://localhost. I change projects frequently in IIS and this presents a problem because I see stylesheet and image data from my previous project with no way to get this page to reload without forcibly dumping all cache data from the settings menu.

Is there another key combination I am missing, or is there a place I can (on a site by site basis) turn off caching? I prefer not to have to clear out my temporary files in the browser settings as I switch projects frequently.

Thanks, Kyle

0

6 Answers 6

4

Update: This is supported in current versions of Chromium and Chrome.


No, you are not missing anything. Chromium did not actually support forced-reload until recently.

Either you can use the latest dev build in which it has been implemented, or you can delete the cache by pressing Ctrl+Shift+Del, then doing a reload. Sorry, no other key-combo or quicker/easier solution.

(Unofficially, that is, untested, but I have noticed from a year-and-half of use that Chromium tends to pick up new info (eg changes in the HOSTS file, modified files, etc.) if you do a reload after a while, say a couple of minutes, whereas it if you reload right away, it will just use the cached info. So you could try that, but the delay may be more hassle than just emptying the cache.)

1
1

According to this page, ctrl+F5 should do what you want on Windows. However, there are a lot of bug reports pertaining to it not functioning correctly.

1
  • Agreed, it is not working as described (that it should) in the use case I am describing. I will do some more search and hopefully post a solution here if I find one.
    – Kyle B.
    Mar 9, 2010 at 16:01
1

Looks like this has finally been implemented.

Holding down Shift while accessing the View menu will give you a "Force Reload" option - complete with a hotkey. On Mac, it's Shift-Command-R.

1
  • Where's the View menu? On Windows I just have a wrench nowadays.
    – Tom
    Aug 19, 2010 at 16:02
1

I think that the best solution is setting up non-writable permissions on the cache stuff

HERE

1

Another temporary solution until this is fixed in Chrome is to open an Incognito window (ctrl-shift-n). In a new Incognito window, Chrome will not use the cache.

0

You might want to try using some sort of CSS caching. I recently decided to fix this using the following approach:

PHP

$smarty->assign('css_hash', filesize('style/style.css'));

Smarty

<link rel="stylesheet" href="/style/style.css?{$css_hash}" type="text/css" />

This will ensure that the browser loads the CSS when the size of the stylesheet changes. You could instead use a timestamp or a proper hash (e.g. MD5), but this fix sufficed for my purpose.

Not the answer you're looking for? Browse other questions tagged .