Method 1: Add If-Modified-Since header
When xmlhttp is called multiple times, it always displays the cached page. Try adding the corresponding http header in php or asp to explicitly not cache it, but it has no effect!!
Now I finally found a way, which is to send an If-Modified-Since header after xmlhttp.open. The code is as follows
xmlhttp.setRequestHeader('If-Modified-Since', '0');
xmlHttp.onreadystatechange = stateChanged;
xmlHttp.open("GET", url, true);
xmlHttp.setRequestHeader('If-Modified-Since', '0');
xmlHttp.send(null);
Method 2: Add changing parameters after the request URL
Because IE caches the same URL request by default, the URL is added with unique parameters as a distinction. Keeping the URL of each request different can bypass the IE cache problem.
js: URL = "http://host/a.php"+"?"+Math.random();
vbs: URL = "http://host/a.php"&"?"&Timer()
//var url = "ResponseContentPageScore.aspx?key=" + Math.round(Math.random() * 100) + "&HotelCD=" + inputContent;
var url = "ResponseContentPageScore.aspx?key=" + new Date().getTime() + "&HotelCD=" + inputContent;