How to get Chrome to reload source maps? How to get Chrome to reload source maps? google-chrome google-chrome

How to get Chrome to reload source maps?


I had this same issue just today. The wait to solve it for me was to close the coffee file's tab under sources, go to the network tab, right click, and select "Clear Browser Cache"

This fixed it for me.

That said, the mapped files don't always get "stuck" in cache for me... Only sometimes, and when they do, the clear cache trick fixes it.


Just had the same issue and found some additional solutions:

According to this commit and this bug report for chromium, the problem is solved and should not affect one of the next builds.

A little bit simpler solution for this problem than clearing the whole Browser Cache:

Open the source map in a browser tab and do a hard reload (depending on OS, try CTRL+F5). This refreshes the file and keeps the browser cache.

An alternate way and perhaps a good practise is to hack the source map generation by adding a parameter like ?build=12345. Refer to your build tool on how to manipulte the filename of the source map.

If you have access to the server config or a .htaccess, you could set the header Cache-Control: no-cache for the source map extension like '.js.map'.


Go to settings -> Show advanced settings -> Clear Browsing Data -> Check only "cached images and files" -> Click "clear browsing data"

This will clear the source maps you have cached in the browser without deleting all the cookies.