如何指示浏览器 js 文件已更改且不刷新它会反映在客户端。所以它下载了新副本?

How to indicate the browser that js file has changed and without refreshing it will reflect on client side. So it downloads the new copy?

当JS文件发生变化时,它会立即反映到客户端而不刷新并清除缓存。我怎样才能做到这一点?一种方式是 Grunt 如果您知道另一种方式,请告诉我

如果您使用 gulp 或 grunt 这些是 javascript 任务运行器,它们会监视 js 文件,如果任何 js 文件发生任何变化,它会立即重新加载页面

Gulp

https://github.com/gulpjs/gulp

https://scotch.io/tutorials/automate-your-tasks-easily-with-gulp-js

咕噜

http://mattbailey.io/a-beginners-guide-to-grunt-redux/