关于IE缓存的解决方案(HTML,JSP,ASP,PHP,C#)
2007-11-28 09:35
543 查看
禁止服务器端缓存:Response.Expires = 0 或<meta http-equiv="Expires" CONTENT="0"> 禁用客户端缓存。
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">
ASP网页
<%
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.cachecontrol = "no-cache"
%>
PHP网页
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
JSP
response.setHeader("Pragma","No-Cache");
response.setHeader("Cache-Control","No-Cache");
response.setDateHeader("Expires", 0);
C#中禁止cache的方法!
Response.Buffer=true;
Response.ExpiresAbsolute=System.DateTime.Now.AddSeconds(-1);
Response.Expires=0;
Response.CacheControl="no-cache";
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">
ASP网页
<%
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.cachecontrol = "no-cache"
%>
PHP网页
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
JSP
response.setHeader("Pragma","No-Cache");
response.setHeader("Cache-Control","No-Cache");
response.setDateHeader("Expires", 0);
C#中禁止cache的方法!
Response.Buffer=true;
Response.ExpiresAbsolute=System.DateTime.Now.AddSeconds(-1);
Response.Expires=0;
Response.CacheControl="no-cache";
相关文章推荐
- 关于IE缓存的解决方案(HTML,JSP,ASP,PHP,C#)(转)
- .NET/ASP.NET/C#/WCF/SQL Server/My SQL/Java/JSP/JDBC/Spring/Spring MVC/PHP/Python/Ruby/Shell/Agile/CSS/HTML/HTTP/Unix/Linux大量PDF书籍/电子书籍下载, Effective Java 下载
- 关于html、jsp、asp、php页面的一个理解
- 解决iframe跨域读写Cookies的问题,(ASP、ASP.NET、PHP、JSP)解决方案
- 解决iframe跨域读写Cookies的问题,(ASP、ASP.NET、PHP、JSP)解决方案
- asp,php,jsp,html禁止缓存的方法
- UrlRewrite、地址映射技术(jsp,asp,aspx,php转html)
- asp和jsp和PHP 和xml和css和js和HTML 都是什么区别?
- 如何在html、php、jsp、asp等页面中添加分析代码(跟踪代码)
- 在不同语言中关于CheckBox的处理办法(ASP、JSP、PHP)
- 如何在Flash里显示HTML,asp,jsp,php文件
- asp.net,java,jsp,安卓Android,php,vb.net,c#/c++免费毕业课程设计源码共享下载
- 【web开发】HTML\CSS\JavaScript与PHP\ASP\JSP之间的区别
- 怎么区别htm_html_dhtml_xhtml_shtm_shtml_ASP_JSP_PHP ?
- 繁体解决方案一,ASP,JSP,PHP,DotNet任何开发通用
- Html、Asp、Php、Jsp禁止页面缓存
- ASP,JSP,ASP.NET,PHP,HTML等软件技术交流群42173344欢迎加入! 2000人超级群
- C#、C#.NET与PHP、JSP、ASP的比较和总结
- 解决跨域读写Cookies的问题,(ASP、PHP、ASP.NET、JSP)解决方案
- jsp关于include html、jsp等文件出现乱码问题的解决方案