刷新页面

xuya 2003-04-11 09:10:49
一些查询数据库的asp页面,为什么更改了数据库之后,再去浏览该页面,看到的是该之前的数据,只有刷新后才可以看到此刻数据库里的数据。这是不是浏览器缓存的缘故,有哪些方法可以实现一打开该页,就是刷新了的呢?
望高手指教!
...全文
89 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
denghan 2003-04-11
  • 打赏
  • 举报
回复
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"
750906 2003-04-11
  • 打赏
  • 举报
回复
<%
response.expires = 0
response.expiresabsolute = Now() - 1
response.addHeader "pragma","no-cache"
response.addHeader "cache-control","private"
Response.CacheControl = "no-cache"
%>
这样更好
possible_Y 2003-04-11
  • 打赏
  • 举报
回复
还有可能是浏览器的临时文件造成的
smartufo 2003-04-11
  • 打赏
  • 举报
回复
在页面顶部加上:
<% response.buffer=true
response.expires=0
response.cachecontrol="no-cache"
%>
不让页面缓存!

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧