问题:为什么禁用JSP页面缓存
就是为了得到实时信息
怎样禁用JSP页面缓存
1.在JSP页面设置
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
2.可通过Filter来控制
response.setHeader("pragma" ,content="no-cache");
response.setHeader("cache-control",content="no=cache");
response.setDateHeader("expires",-1);
filter的urp-pattern *.jsp