I'm having difficulty with browser caching causing my AJAX application to not display updated information. I've tried putting
Code:
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
lines everywhere I can think of, both in the HTML page that contains the AJAX code as well as the file that the xmlHttp request gets the data from.
I've found two ways to correct this, neither of which is highly desirable. One is to set Tool/Intetnet Options/Temporary Internet files/Every visit to the page. The other is to send custom HTTP headers. Is it possible this is the source of my grief?
There must be some other way to prevent browser caching. I should mention that the data file that comes back from the xmlHttp request is not a standard XML file. I don't know if that's an issue or even non-standard for that matter. The format of that file is:
<HTML><HEAD><META HTTP-EQUIV="Pragma" CONTENT="no-cache"><META HTTP-EQUIV="Expires" CONTENT="-1"></HEAD><BODY></BODY></HTML>^31D,D,1,1,,Z,,3533366880|53A,A,9,3,,Z,,35333 66880^Dec 22 1804Z^<HEAD><META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"></HEAD>
Basically it's a string with the ^ character separating the major sections and the | character separting records. I use this because it doesn't have the overhead of an XML file and it's easy to parse using the JavaScript split() method.