通过jsp内置response对象设置jsp页面无缓存

将下面这段代码添加到jsp页面上的<% page标签下面那里即可
<%
	String path = request.getContextPath();
	response.setHeader("pragma","no-cache");
	response.setHeader("cache-control","no-cache");
	response.setHeader("Cache-Control", "no-store");  
	response.setDateHeader("Expires", 0); 
%>

你可能感兴趣的:(jsp)