查看: 164|回复: 0

[ASP入门] 阻止ASP页面被缓存的办法

[复制链接]
xuanxiao 发表于 2023-4-21 23:10:44 | 显示全部楼层 |阅读模式
如果您在已经使用过 response.write 之后尝试使用 response.redirect,您将收到一个错误。下面的代码示例负责缓冲到浏览器的输出,并防止您的页面被 IIS 缓存。这会强制 IIS 在每次调用时重新处理页面。
  1. <%
  2. Response.Buffer = True
  3. Response.AddHeader "cache-control", "private"
  4. Response.AddHeader "pragma", "no-cache"
  5. Response.ExpiresAbsolute = #May 21,1900 13:30:15#
  6. Response.Expires= 0
  7. %>

复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表

在线客服

售前咨询
售后咨询
服务热线
023-58418553
微信公众号