jsp页面清除缓存

1.服务端方法

<%    
response.setHeader("Pragma","No-cache");     
response.setHeader("Cache-Control","no-cache");     
response.setDateHeader("Expires", -10);    
%>  

2.客服端方法

在head中加入

<html> 
<head> 
<meta http-equiv="Expires" CONTENT="0"> 
<meta http-equiv="Cache-Control" CONTENT="no-cache"> 
<meta http-equiv="Pragma" CONTENT="no-cache"> 
</head>

你可能感兴趣的:(jsp)