When jquery Ajax is used to call data asynchronously, the first normal return value can be returned, and the background will not be executed. The first access result is always returned. Even if Ctrl + F5 is used, the latest data cannot be obtained.
After the test, it is found that IE8 caches the result obtained for the first time.This problem occurs because IE8 caches the data obtained by the get method by default,Therefore, it will not be submitted to the background for the second time..
The solution is also very simple. You can set cache: false in each request. Or set $. ajaxsetup ({cache: false}) globally }).
Browser cache also has some advantages, such as reducing redundant data transmission, Saving network fees, reducing the burden on servers, and greatly improving website performance; it accelerates the loading of web pages on the client.
Therefore, you only need to set IE8. I implemented it like this:
If ($. browser. MSIE & $. browser. Version = '8. 0 '){
$. Ajaxsetup ({cache: false });
}
Serious Ajax cache problems in IE8