Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jsp 在internet explorer和chrome中清除spring mvc 3中的缓存_Jsp_Spring Mvc_Spring 3 - Fatal编程技术网

Jsp 在internet explorer和chrome中清除spring mvc 3中的缓存

Jsp 在internet explorer和chrome中清除spring mvc 3中的缓存,jsp,spring-mvc,spring-3,Jsp,Spring Mvc,Spring 3,我的代码是这样的,它只适用于mozilla firefox <% response.setHeader("Pragma", "No-cache"); response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); response.setDateHeader("Expires",0); %> <c:if test="${empty Sess_Var}" > <

我的代码是这样的,它只适用于mozilla firefox

 <%        
response.setHeader("Pragma", "No-cache");
response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
response.setDateHeader("Expires",0);
%>
 <c:if test="${empty Sess_Var}" >
<%
response.sendRedirect("doLogin.obj");
%>


如何清除internet explorer和Chrome中的缓存?

尝试将
私有,最大年龄=0
添加到
缓存控件
标题中

response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate, private, max-age=0");
注意,这不会清除缓存。它只会向浏览器指示不应缓存内容

另外,尝试将
Expires
标题设置为-1

response.setDateHeader("Expires", -1);

你忘了问问题好的,谢谢,先生,我现在编辑了。