Chrome caches javascript sourcemaps

  • 1 Min. Read.

In a recent project, I made use of Javascript Sourcemaps. Unfortunately, Chrome decided not to play along nicely by caching the maps, resulting in many headaches while debugging. Save yourself some headache, and when you experience this caching issue, simply right click in the network pane and click ‘Clear Browser Cache‘.

Emptying the cache will force Chrome to reload the sourcemaps
Emptying the cache will force Chrome to reload the sourcemaps

An alternative approach would be to right click on the refresh button and select the ‘Empty Cache and Hard Reload‘ button (which is only available when the inspector is open).

Emptying the cache will force Chrome to reload the sourcemaps
Emptying the cache will force Chrome to reload the sourcemaps