Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Struts and the fly likes roblem when caching with Internet Explorer 6.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply 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
 
Similar Threads
Caching Problem with JNLP
Problem with cache and session
Warning: Page has Expired
Internet Explorer does not automatically resubmit your information for you.
Re-login issue after click on browsers back button and press refresh