js清除缓存方法
1.加入如下头描述
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
2.在action,做如下声明
response.setHeader("Pragma","No-cache");
response.setHeader("Cache-Control","no-cache");
response.setDateHeader("Expires", 0);
3.随机参数
var randf = parseInt(Math.random()*1000);
window.location.href='ajax_user_center_mydownload.aspx'+'?'+randf;
浏览器遇到相同的url请求,先请求缓存,没有才请求服务