Since all your servers return 304 not modified
It indicates that on the server, your xml file has not been modified, or the page to be loaded has not been modified locally. The local cache causes this problem.
A common method to prevent caching is to add a random number to the backend, or you can add a timestamp.
For example
Url = "... xml? T = "+ (new Date (). getTime (). toString ();
In this example, I use the following methods:
Copy codeThe Code is as follows:
Var destination = "test.html"
Function goto (destination ){
Var ajaxobj = new AJAXRequest; // create an AJAX object. The class is in the file.
Ajaxobj. method = "GET"; // set the request method to GET
Ajaxobj. url = destination + "? T = "+ (new Date ()). getTime (). toString (); // The response URL, which can be changed to some dynamic processing pages later. It will be known by Ajax, which can return different data for the purpose of the page.
// Set the callback function and output the response content. Because it is a static page (which is my requirement), all the content has come.
Ajaxobj. callback = function (xmlobj ){
Document. getElementById ('page _ content'). innerHTML = xmlobj. responseText; // you can check this sentence.
}
Ajaxobj. send (); // send the request
}