Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Frustrating IE Caching problem..Application Working fine in Firefox

Status
Not open for further replies.

theonenonly

Programmer
Feb 6, 2006
2
US
Hello All, We have a struts application and the server is Tomcat 5.0. I have an ArrayList (A) set in session and an Arraylist (B) which is a subset of A set in request. The ArrayList B always has 10 elements and I use this to be displayed in the jsp page using Logic:iterate tag. The first page displays the arrayelements of List B from request, and when the user clicks next a different action is called which selects a particular subset from A and puts it in B and forwards to the same Jsp page to be displayed there. The next page is working fine in Firefox and displays the new set of elements but in IE 6.0 it displays the old set of elements, it doesnt get changed. I have placed <% response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 response.setHeader("Pragma","no-cache"); //HTTP 1.0 response.setDateHeader("Expires", -2000); //prevents caching response.setHeader("Cache-Control","no-store"); //HTTP 1.1 %> on the top of the jsp and also <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <META HTTP-EQUIV="Expires" CONTENT="-1"> <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache"> in the head. I have also placed <controller nocache="true"></controller> in the struts-config.xml........Even after doing all these its not working in IE 6.0. But everything is fine in Firefox. I have been trying to solve this problem from 2 days. Please HELP!!! Thanx, Struts Programmer.
 
Hi,

I am not sure about the reason but IE is some times bad with chacing the request. I am assuming that Next is a Link in the JSP page which triggers a different action, if so pass a random number as on of the parameter which is generated by JavaScript.

Example:
Code:
 <a href= "someAction.do?rand=" +parseInt(Math.random()*99999999)> Next </a>;

Hope this will help you.

Cheers
Venu
 
Venu...thanx for the advise. I have tried passing a random number as one the parameters but its not working.....I still have the same problem. Is there anything else I could do? Please HELP!!!
Thanx,
Struts Programmer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top