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加?參數(shù)
url?v=.... (Math.random() || timestamp || 其他)