- FacesContext facesContext = FacesContext.getCurrentInstance();
- HttpServletResponse response = (HttpServletResponse)facesContext.getExternalContext().getResponse();
- response.addHeader("Pragma", "no-cache");
- response.addHeader("Cache-Control", "no-cache");
- response.addHeader("Cache-Control", "no-store");
- response.addHeader("Cache-Control", "private");
- response.addHeader("Cache-Control", "must-revalidate");
- response.addIntHeader("Expires", -1);
- //该片段来自于http://www.codesnippet.cn/detail/061120136939.html
来源: http://www.codesnippet.cn/detail/061120136939.html