I am developing a Java EE web application using Struts. The problem is with Internet Explorer caching. If an user logs out he can access some pages because they are cached a
Rather set the following headers on the HttpServletResponse
of the page(s) in question so that you don't need to copypaste it over all pages manually:
response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); // HTTP 1.1.
response.setHeader("Pragma", "no-cache"); // HTTP 1.0.
response.setDateHeader("Expires", 0); // Proxies.
This is equivalent to setting the following meta headers in the page(s) manually:
Also see this answer. Don't forget to clear browser cache before testing ;)