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
I've found the following to work well:
response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate, max-age=0, proxy-revalidate, no-transform, pre-check=0, post-check=0, private");
response.setHeader("Pragma", "no-cache");
response.setDateHeader("Expires", 0);
From the tags on this question it looks like you are using Struts. Struts 1.x allows you to do this through configuration in struts-config.xml by setting nocache="true" on the controller element:
Mark Nottingham's caching tutorial is the best resource I've seen on the web about HTTP and caching if you are looking to understand more.
That being said, depending on the problem you are seeing it might be a browser history issue. See here for more information about that.