Google-chrome – Force Google Chrome to check for new JavaScript files every time I access a web site

browser-cachegoogle-chromeinternet explorerjavascripttemporary-internet-files

So, if I go to Internet options in Internet Explorer:
enter image description here

I can adjust the settings for when IE checks for updates:
enter image description here

Can I do something similar in Google Chrome? Right now when I change my JavaScript file and debug from Visual Studio, Chrome will always use the cached version rather than using the modified version. In order to be able to use the current version I have to manually clear out my temporary internet files/cache, which is really annoying.

Best Answer

Option 1: Disable cache temporarily

  1. Open Developer Tools (Press F12 or Menu, More Tools, Developer Tools)
  2. Open Developer Tools Settings (Press F1 or DevTools Menu, Settings)
  3. Check "Disable cache (while DevTools is open)" under the Network header of the Preferences pane

Option 2: Disable cache for session

Start Chrome with the command-line switches --disk-cache-size=1 --media-cache-size=1 which will limit the caches to 1 byte, effectively disabling the cache.

Option 3: Manual Force Refresh

Reload the current page, ignoring cached content: Shift+F5 or Ctrl+Shift+r

Chrome Keyboard Shortcuts - Chrome Help (Under "Webpage shortcuts")

Option 4: Extra Reload Options (Source)

With Developer Tools open, right-click the Reload button to display a reload menu with the following:

  • Normal Reload (Ctrl+R)
  • Hard Reload (Ctrl+Shift+R)
  • Empty Cache and Hard Reload
Related Question