让JSP页面不缓存

在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.java3z.com/cwbwebhome/article/article2/22.html?id=58

猜你喜欢

转载自beijishiqidu.iteye.com/blog/2001552
今日推荐