当前位置: 移动技术网 > IT编程>开发语言>Asp > asp、html、js 禁止缓存的代码

asp、html、js 禁止缓存的代码

2017年12月08日  | 移动技术网IT编程  | 我要评论

asp

response.buffer = true
response.expiresabsolute = now() - 1
response.expires = 0
response.cachecontrol = "no-cache"
response.addheader "pragma", "no-cache"

 
html

<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">

 
javascript
对于js,可以在引用js的时候 后面随便加一个 随机的参数,随机参数由当前页面的js生成,例如:

<script type="text/javascript" src='jscript.js?rnd=10092'>

以上所述就是本文的全部内容了,希望大家能够喜欢。

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网