最近被测试组测试出来在IE浏览器下修改页面已经修改了数据入库,但是重新打开该条数据进行修改时,数据展示的却还是未修改之前的数据。Firefox没有发现这个问题。
在jsp中已经加入了
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
怎奈不管用,使用的springMVC,然后我在java代码中,在页面跳转代码之前加入了
response.setHeader("Cache-Control","no-cache");
//Forces caches to obtain a new copy of the page from the origin server
response.setHeader("Cache-Control","no-store"); //Directs caches not to store the page under any circumstance
response.setDateHeader("Expires", 0); //Causes the proxy cache to see the page as "stale"
response.setHeader("Pragma","no-cache"); //HTTP 1.0 backward compatibility
response.setHeader("Cache-Control","no-store"); //Directs caches not to store the page under any circumstance
response.setDateHeader("Expires", 0); //Causes the proxy cache to see the page as "stale"
response.setHeader("Pragma","no-cache"); //HTTP 1.0 backward compatibility
将其搞定
转一篇缓存实现原理