让JSP页面不缓存 博客分类: 备忘录Java Webmore and morecommon jsp缓存
程序员文章站
2024-03-24 20:38: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.java3z.com/cwbwebhome/article/article2/22.html?id=58