若是不須要瀏覽器作緩存,能夠試一下在header裏寫一些信息(具體沒試過,網上找的)javascript
<meta http-equiv="Expires" content="0"> <meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Cache-control" content="no-cache"> <meta http-equiv="Cache" content="no-cache">
動態加載js文件,在js資源url後加隨機數java
<script> document.write("<script type='text/javascript' src='js/test.js? "+ Math.random(); +"'></script>"); </script>