Clearing cache in Google-Chrome with Linux

13, Jul, 2010

The current Google-Chrome only comes with a manual cache clearing option so when you re-visit web pages you can often be looking at the cached version instead of the current version.

As a workaround I have changed the last lines of the google-chrome startup script to include removing of any cached files before it launches the program itself. On my Fedora 13 installation this lives in /opt/google/chrome/google-chrome.

So change the following:

# We don’t want bug-buddy intercepting our crashes. http://crbug.com/24120
GNOME_DISABLE_CRASH_DIALOG=SET_BY_GOOGLE_CHROME
export GNOME_DISABLE_CRASH_DIALOG

exec -a “$0” “$PROGDIR/chrome” “$@”

to:

# We don’t want bug-buddy intercepting our crashes. http://crbug.com/24120
GNOME_DISABLE_CRASH_DIALOG=SET_BY_GOOGLE_CHROME
export GNOME_DISABLE_CRASH_DIALOG

rm -f ${HOME}/.cache/google-chrome/Cache/*

exec -a “$0” “$PROGDIR/chrome” “$@”

The “rm -f” line forcefully removes and files in the local users Cache directory.

  • Posted by david in in Tips