|
|
|
|
|
ASP 清除页面缓存http://www.xishui.net 2008年07月13日11:07 浠水网
现在我将清除页面缓存的一些方法总结如下:
1、在Asp页面首部加入 《% Response.Buffer = True Response.ExpiresAbsolute = Now() - 1 Response.Expires = 0 Response.CacheControl = "no-cache" Response.AddHeader "Pragma", "No-Cache" %》 2、在HtML代码中加入 《HEAD》 《META HTTP-EQUIV="Pragma" CONTENT="no-cache"》 《META HTTP-EQUIV="Cache-Control" CONTENT="no-cache"》 《META HTTP-EQUIV="Expires" CONTENT="0"》 《/HEAD》 3、在重新调用原页面的时候在给页面传一个参数 Href="****.asp?random()" 4、在页面文件头部加上 《%@ OutputCache Duration="1" VaryByParam="*" %》 说明:禁止浏览器从本地机的缓存中调阅页面内容。 用法:《Meta http-equiv="Pragma" Content="No-cach"》 注意:网页不保存在缓存中,每次访问都刷新页面。这样设定,访问者将无法脱机浏览。
【发表评论】
|
|||||||