File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes roblem when caching with Internet Explorer 6.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "roblem when caching with Internet Explorer 6.0" Watch "roblem when caching with Internet Explorer 6.0" New topic
Author

roblem when caching with Internet Explorer 6.0

Davide Alagna
Greenhorn

Joined: Feb 16, 2005
Posts: 5
Hi all,
I have a big problem when caching with Internet Explorer 6.0. In order to prevent caching to all my Struts Actions, I have created a class called BaseAction that implements cache control:

response.setHeader("Cache-Control","no-cache");
response.setHeader("Cache-Control","no-store");
response.setDateHeader("Expires", 0);
response.setHeader("Pragma", "no-cache");

All my Struts Actions extend my BaseAction class. The problem is that, when I click the back button, IE shows the error page "The page cannot be displayed".

The problem does not occur if I disable the first two headers:

//response.setHeader("Cache-Control","no-cache");
//response.setHeader("Cache-Control","no-store");

In order to see what IE does when I click the back button, I have made a snoop of tcp/http traffic. IE does not send anything (neither a bite!) to the server when I click the back button.
Furthermore, the problem does not occur when using Firefox 1.0.3 (it shows the message "the page contains POST data - do you want to resend data?").

Can anybody help me please? Thanks in advance.
David
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: roblem when caching with Internet Explorer 6.0