Fix Chrome caching of Source Maps

Over the past few days I have (finally) started tinkering with Grunt and one feature, Source Maps, was not quite working for me. I had set up my Uglify task that concats, uglifies and creates a source map of the various files and all was well, that is, until I realised that these source maps were not updating along with the changes to my compiled javascript. I didn’t realise quickly enough that Chrome (in my case, Canary) was caching these source maps despite the Disable cache option was enabled.

Fix it

Go to the ‘Network’ tab (in dev tools), right click and select ‘Clear browser cache’, then close any open files in the ‘Sources’ tab. Now, refresh the page and that’s it - source maps updated!

Let me know if that worked for you, or if there’s another way to fix this issue.