手机页面清除缓存
第一种方法:
<meta http-equiv=”Pragma” content=”no-cache”>
<meta http-equiv=”Cache-Control” content=”no-cache”>
<meta http-equiv=”Expires” content=”0″>
第二种方法:
第三种则是在跳转时传一个随机的参数! 因为aspx的缓存是与参数相关的,如果参数不同就不会使用缓存,而会重新生成页面,每次都传一个随机的参数就可以避免使用缓存。
function go(){
if(window.location.href.indexOf(‘temp’)==-1){
if(window.location.href.indexOf(‘?’)==-1){
window.location.href=window.location.href+’?temp=’+Math.random().toString()
}
else{
window.location.href=window.location.href+’&temp=’+Math.random().toString()
}
}
}