meta方法
<meta http-equiv="prama" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
<meta http-equiv="expires" content="0">
清理form表单的临时缓存
<body onLoad="javascript:document.yourFormName.reset()">
jQuery ajax
1、在请求头加入If-Modified-Since和Cache-Control
beforeSend :function(xmlHttp){
xmlHttp.setRequestHeader("If-Modified-Since","0");
xmlHttp.setRequestHeader("Cache-Control","no-cache");
}
2、直接使用cache: false
$.ajax({
url:'www.haorooms.com',
dataType:'json',
data:{},
cache:false,
ifModified :true ,
success:function(response){
//操作
}
})
Url加?参数
url?v=.... (Math.random() || timestamp || 其他)