Recently written ProgramYes. Sometimes, when Ajax is used, since the request page cannot be accessed, it does not go to the background. Code.........
After testing for a long time, I found that it should be a cache problem:
You can add:
XMLHTTP. setRequestHeader ("If-modified-since", "0 ");
Or if your background request page is a. ASPX page, you can directly set it without considering Caching:
<% @ Outputcache location = "NONE" %>
Page default:
The output cache can be located on the browser client that generates the request, the proxy server that participates in the request (or any other server), or the server that processes the request.
If this parameter is set to none, the cache is disabled.
I thought about the reason:
In fact, in IE, if the URL submitted by XMLHttpRequest is the same as that in history, the cache is used and it is not submitted to the server. Therefore, you cannot obtain the submitted data or new data.
Of course, from the Internet, I also said that the value of the parameter passed for can be randomly changed so that the browser does not cache. I think it is also possible.