如何防止IE缓存jsp文件
2001-01-10 16:29:00 来源:WEB开发网核心提示:1, 使用java提供的方法,在jsp或者servlet中都可以 <% response.setHeader("PRagma","No-cache"); response.setHeader("Cache-Control","no-cache&
1, 使用java提供的方法,在jsp或者servlet中都可以
<%
response.setHeader("PRagma","No-cache");
response.setHeader("Cache-Control","no-cache");
response.setDateHeader("Expires", 0);
%>
2, 使用HTML标记,如下面:
<HEAD>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
</HEAD>
<%
response.setHeader("PRagma","No-cache");
response.setHeader("Cache-Control","no-cache");
response.setDateHeader("Expires", 0);
%>
2, 使用HTML标记,如下面:
<HEAD>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
</HEAD>
更多精彩
赞助商链接