apache - Clearing cache frequently in Chrome

24
2013-08
  • Mr_Green

    I am doing a project using Sencha extjs 4.1.1a. The Web Server I am using is Apache (XAMPP Control panel 3.1.0.3.1.0). I kept the project file in htdocs folder.

    Now whenever I am changing the code in my project files, I am expecting some changes in the look of web page. Which is not happening in Google chrome. When I wasted so much of time, I realised that "Clearing the cache" will solve the problem.

    Now the problem is, whenever I make even small changes, I need to "Clear the cache" of Google chrome. which is really annoying.

    I am seeing changes in IE10 without clearing the cache. But as I love working with Chrome, I am asking here for support.

    • Default Browser --> Google Chrome Version 25.0.1364.172 m

    I just want to know: Why google chrome is behaving such that I need to clear the cache frequently? (Previously, I never cleared cache while testing my projects so frequently)

    This seems to be happening from the day when I updated my IE9 to IE10 through Windows Automatic Updates

  • Answers
  • Roney Michael

    This is more of a workaround than a solution really, but you could just try ctrl+F5 instead of simply refreshing the page (using F5).

    This ignores the page saved in the cache and does a fresh GET. This should serve well enough as any changes made will be reflected in Chrome on doing so.

  • Nishant Kumar

    You can use a widely popular free tools "Ccleaner" it can clear the cache in just few second it has many other feature which is very impressive for a 3MB size free application, and the best part is in Ccleaner you can delete all browsing stuffs like history and all other and you also have custom option to choose what you want to clear with Ccleaner open ccleaner -> go to application -> below the google chrome -> tick in the check what you want to delete. enter image description here


  • Related Question

    cache - Chrome browser caching
  • Kyle B.

    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


  • Related Answers
  • Synetech

    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.)

  • Sarah

    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.

  • desau

    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.

  • lisak

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

    HERE

  • Tauren

    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.

  • Paul Lammertsma

    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.