码迷,mamicode.com
首页 > 其他好文 > 详细

禁止浏览器缓存

时间:2014-12-10 17:50:06      阅读:140      评论:0      收藏:0      [点我收藏+]

标签:http   color   sp   on   div   bs   ad   html   as   

HTML:
<META HTTP-EQUIV="pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-store, must-revalidate">
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
<META HTTP-EQUIV="expires" CONTENT="0">
 
ASP
response.expires=0
response.addHeader("pragma","no-cache")
response.addHeader("Cache-Control","no-store, must-revalidate")
 
PHP
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-store, must-revalidate");
header("Pragma: no-cache");
 
JSP:
response.addHeader("Cache-Control", "no-store, must-revalidate");
response.addHeader("Expires", "Thu, 01 Jan 1970 00:00:01 GMT");

禁止浏览器缓存

标签:http   color   sp   on   div   bs   ad   html   as   

原文地址:http://www.cnblogs.com/itzjm/p/4155901.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!