aspose file tools*
The moose likes Servlets and the fly likes dealing with caching in IE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "dealing with caching in IE" Watch "dealing with caching in IE" New topic
Author

dealing with caching in IE

Anthony Leroy
Greenhorn

Joined: Aug 02, 2001
Posts: 20
Hi, I've been testing my jsp site in both Netscape 4.08 and IE 4. I have an "edit details" window which pops up when a link is clicked and displays the current details in the input fields. This allows the user to edit the details. When the user hits save, the new info. is committed to the database and the window closes, and the page in the parent window is refreshed to reflect the new details in the DB.
In Netscape, once all this has been done, if the user clicks the link to edit the details again, the most recent details are displayed in the text fields in the popup window, but in IE, it loads the old version of the page so the old details are displayed.
When I right click > refresh it updates. How do I get it to automatically regenerate the page from the server and load it rather than loading the old version?
Thanks,
Ant
James Swan
Ranch Hand

Joined: Jun 26, 2001
Posts: 403
Hi,
there are various ways to control this:
- <meta> tags in the html for setting caching
- modifying the response sent back from the server to indicate no caching should be done
Most of the time the various browsers ingore these to methods.
A common approach (and one that is successful) is to trick the browser in thinking it is requesting a new page each time.
This is done by appending a dummy variable to the query string of the url with a unique value (a timestamp is a good option).
eg. www.myserver.com?dummy=timeStampValue
This can be done using JavaScript and it's Date object.
James.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

What a brilliant idea.

I'll have to try that.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: dealing with caching in IE
 
Similar Threads
siteminder logout problem
refreshing form fields
Opening a link in IE from Netscape
Working in ie but not working in netscape
Opening Windows