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()"
我的方法同第一种类似,是将下面语句写进一个asp头文件,然后其他每个页面一开始就include那个asp头文件。
''禁用页面缓存
Response.expires = 0
Response.expiresabsolute = Now() - 1
Response.addHeader "pragma", "no-cache"
Response.addHeader "cache-control", "private"
Response.CacheControl = "no-cache"
ASP 禁止页面被缓存
原创文章如转载,请注明:转载自悠悠博客 [ http://www.ajaxstu.com/ ]
相关文章:
- asp重定向-response.redirect和server.transfer(2007-10-24 9:18:30)
- vbscript Replace 函数(2007-10-21 4:33:2)
- vbscript:日期格式常数(2007-10-10 7:30:49)
- For...Next 语句(2007-10-4 9:43:2)
- Chr 函数(2007-10-2 9:21:42)
- vbscript InputBox 函数(2007-9-24 8:25:19)
- CCur 函数(2007-9-20 6:10:44)
- vbscript:字符串常数(2007-9-19 1:12:22)
- While...Wend 语句(2007-9-12 4:58:27)
- vbscript Join函数文档与实例(2007-8-27 4:52:50)
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。
