Method 1: Add If-Modified-Since header
When xmlhttp is called multiple times, it always displays the cached page. Try adding the corresponding header in php or asp. The http header explicitly does not want to be cached, but it has no effect!!
Now I finally found a way, which is to send a If-Modified-Since header after xmlhttp.open. The code is as follows
xmlhttp.setRequestHeader('If-Modified- Since', '0');
xmlHttp.onreadystatechange = stateChanged;
, '0');
xmlHttp.send(null);
Method 2: Add change 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=" new Date ().getTime() "&HotelCD=" inputContent;