让JSP页面不缓存

发表于:2007-07-04来源:作者:点击数: 标签:
在JSP页面的前面加上:

1、
<meta http-equiv="Pragma" content="No-cache">
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
<meta http-equiv="Expires" content="-1">

2、
<% response.setHeader("Cache-Control","no-cache");%>
<% response.setHeader("Pragma","no-cache");%>
<% response.setDateHeader ("Expires",-1); %>

3、
<%@ page buffer="none"%>

原文转自:http://www.ltesting.net