response防止页面缓存和重设响应头部
// 防止缓存 //Forces caches to obtain a new copy of the page from the origin serverresponse.setHeader("Cache-Control","no-cache"); //Directs caches not to store the page under any circumstanceresponse.setHeader("Cache-Control","no-store"); //HTTP 1.0 backward compatibility response.setHeader("Pragma","no-cache"); //Causes the proxy cache to see the page as "stale"response.setDateHeader("Expires", 0); // 重新设置响应头部response.setContentType("text/html;charset=UTF-8");// response.setContentType("text/xml;charset=UTF-8");