解决浏览器缓存,在HTML页面添加js和css随机数,用于获取最新文件

引入js

<script type="text/javascript" src='xxx.js?random="+Math.random()+"'></script>

引入css

<link rel="stylesheet" type="text/css"  href='xxx.css?random="+Math.random()+"'/>

  

原文地址:https://www.cnblogs.com/lqblods/p/12922265.html