'Check for newer versions of stored pages'
Posted on 2006-04-09
I'm using AJAX on my website, but internet explorer does not seem to actually be refreshing the data I retrieve via AJAX when I refresh the page. For example, I have a button that when pressed uses an XMLHttpRequest to go read some data from a database then returns it to the browser for display. It looks like:
XMLHttpRequest gets data from db
XMLHttpRequest renders returned data in client browser
I can update the records in the database, ask the page to retrieve data but it doesn't seem to 'see' the new records unless I close the browser, and open a new instance. Then it picks up the changes.
Also if I go into the IE settings and choose 'Check for newer versions of stored pages: Every visit to the page' it works perfectly.
I can't rely on users to have chosen that setting though, so what can I do to get around this behaviour?