HTM网页
<META HTTP-EQUIV="pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
或者<META HTTP-EQUIV="expires" CONTENT="0">
ASP网页
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.cachecontrol = "no-cache"
PHP网页
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
你在asp中加入<% response.buffer=false%>就可以了
寂寞的灵魂临水而立,水面漂浮的是自己相依相缠的影子
Response.AddHeader "Pragma", "no-cache"
Response.Buffer = False
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
呵呵,大而全
版主能一一解释一下吗?
ASP.PHP.ColdFusion.
我爱后台
Response.AddHeader "Pragma","no-cache"
相当于加入一个HTML的HEAD,相当于
<meta http-equiv="Pragma" CONTENT="no-cache">
Response.Buffer不用说了吧,从字面就可以理解啦
Response.ExpiresAbsolute和Response.Expires都是设置Cache过期时间的,不同的是:
Response.ExpiresAbsolute [= [date] [time]]
Response.Expires [= number]
Response.Expires = 0也就是相当于这个HEAD
<meta http-equiv="Expires" CONTENT="0">
Response.CacheControl="no-cache"相当于,这个HEAD
<meta http-equiv="Cache-Control" CONTENT="no-cache">
如果只是静态页面,在meta里设置no-cache就足够了
[#0099CC]{ KUka ALl wAYs wITh yOU }[/#]