I created a Servlet filter with the following code in doFilter:
HttpServletResponse httpResponse = (HttpServletResponse)response;
httpResponse.setHeader("Cache-Control","no-cache");
httpResponse.setHeader("Pragma","no-cache");
httpResponse.setDateHeader("Expires", 0);
chain.doFilter(request, response);
I want to make sure that nothing gets cached at the Client and every request (even the one's from the Browser's back button) are directed to the Server.
But, even after implementing the above filter, some pages are cached (accessible using browser's back button).
And other pages that are not cached, show Web Page Expired error in Internet Explorer.