禁止網(wǎng)頁(yè)緩存等于返回刷新網(wǎng)頁(yè)
有時(shí)在網(wǎng)頁(yè)制作時(shí)并不太希望網(wǎng)頁(yè)保存緩存,比如在填寫表單返回時(shí),又或者在登陸退出后直接輸入地址還能回到緩存頁(yè)面,這時(shí)后你不用想破腦袋來(lái)解決如果返回刷新數(shù)據(jù)的問(wèn)題,網(wǎng)頁(yè)端禁止緩存就行了。
HTML禁止網(wǎng)頁(yè)緩存方法: 
<META HTTP-EQUIV="pragma" CONTENT="no-cache"> 
<META HTTP-EQUIV="Cache-Control" CONTENT="no-store, must-revalidate"> 
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT"> 
<META HTTP-EQUIV="expires" CONTENT="0"> 
ASP禁止網(wǎng)頁(yè)緩存方法: 
response.expires=0 
response.addHeader("pragma","no-cache") 
response.addHeader("Cache-Control","no-store, must-revalidate") 
PHP網(wǎng)頁(yè)禁止緩存方法: 
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); 
header("Cache-Control: no-store, must-revalidate"); 
header("Pragma: no-cache"); 
JSP網(wǎng)頁(yè)禁止緩存方法: 
response.addHeader("Cache-Control", "no-store, must-revalidate"); 
response.addHeader("Expires", "Thu, 01 Jan 1970 00:00:01 GMT"); 


