In Java:
HttpServletResponse response = (HttpServletResponse)rep;
response.setDateHeader("Expires", -1);
response.setHeader("Cache_Control", "no-cache");
response.setHeader("Pragma", "no-cache");
In Jsp:
<%
response.setHeader("Cache-Control","no-cache");
response.setHeader("Pragma","no-cache");
response.setHeader("Expires","-1");
%>
标签:缓存,java,no,cache,HttpServletResponse,jsp,response,setHeader
From: https://blog.51cto.com/u_16261339/7468588