jsp清除缓存

好多代码都是:

<%
response.setHeader("Cache-Control", "no-store"); //HTTP 1.1
response.setHeader("Pragma", "no-cache"); //HTTP 1.0
response.setDateHeader("Expires", -1); //prevents caching at the proxy server
%>

但经本人多次测试发现上述代码并不总是生效的,在第一次提交表单后仍能回退,第二次提交表单后才能禁用缓存。哪位大佬有合适的方法可以在留言区里分享出来大家讨论学习

猜你喜欢

转载自www.cnblogs.com/yanan7890/p/9006350.html