Why isn't Google Chrome reloading my scripts?

The universal solution that works in Chrome, Firefox and IE is cleaning the cache via Ctrl+Shift+Del (on Mac +Shift+).

Chrome solution #1

  1. Open Developer Tools (F12 or ++i, or right-click → Inspect).
  2. Select the Network tab and tick the Disable cache checkbox.

Chrome disable cache - Network tab

  1. Reload the page.

❗️Note: The cache will be disabled only when the devtools window is open.

Chrome solution #2

This only makes sense if #1 is not used.

  1. Open Developer Tools.
  2. Click the Settings cogwheel icon in the bottom right corner.
  3. In the dialog that appears, select under the Network subsection the Disable cache checkbox: from now on the cache will be skipped when the devtools window is open. When the devtools windows is closed caching will work as usual.

Chrome disable cache in devtools settings

Chrome solution #3: empty cache + hard reload

  1. Open Developer Tools (otherwise the menu in the next step won't show).
  2. Click and hold down the Refresh button, and then select from the dropdown Empty Cache and Hard Reload.

Chrome Hard Refresh and Cache Reset

Modifying javascript code

A browser-agnostic solution which could be used for debugging is to append in your server-side code a randomly-generated version string as a query parameter, i.e. call your script as:

<script type="text/javascript" src="myscript.js?ver=12345"></script>

This trick will force the browser to reload the script when the value of the ver parameter changes. If you make ajax requests then you can append "?ver=" + new Date().getTime() to your URL.

NOTE: Don't forget to remove the parameter when you are finished debugging because in production you most likely do want the scripts to be cached. It is a common practice though to generate a new timestamp on each new build — this can be used in production, and will ensure that after a new deployment the clients will always get the updated scripts.


Unlike all the above solutions this one will work even when you have some sort of caching (e.g. redis, memcached, varnish) or CDN (e.g. akamai, cloudflare, cloudfront, etc) between the client and the server.