Some tools, like Ruby on Rails will compute a unique signature as part of the file name for each file when you prepare for deployment to production. This helps ensure that every time you deploy new code, only the new version of everything will be linked to.
If you use WebPack it may help you out quite a bit. Take a look here https://medium.com/powerspace-engineering/how-to-cache-busti...