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"> 3、删掉work目录后重启动4、清除浏览器缓存,设置每次访问此页时检查网页的最新版本想不到其他办法了
<%
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"> 3、删掉work目录后重启动4、清除浏览器缓存,设置每次访问此页时检查网页的最新版本想不到其他办法了
就是调这个页面时,页面后面加一个变化的参数如bbs.jsp?para=101010101010
para可以取时间值或session值,那么每次就会更新了
每次不同的数 防止看到的页面不刷新