• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

dealing with caching in IE

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What a brilliant idea.

I'll have to try that.
reply
    Bookmark Topic Watch Topic
  • New Topic