Problem occurs because:
1. IE will only create an AJAX request below, the response results in the browser cache in the next call to the AJAX request from the cache read
Get mode, obtain data, because the sending parameters and address are consistent, so IE browser will be taken from the cache, but not to request the server side, and the post method because of the different parameters, will not produce this problem
2. Firefox will re-establish an AJAX request every time the event is activated
Workaround:
1: After the Ajax requested page, add a random function, we can use the random time function
Add T=math.random () after the URL sent by javascript
For example: url+ "&" + "t=" +math.random (); or new Date (); After the URL parameter, add "? timestamp=" + New Date (). GetTime ();
2.
Copy Code code as follows:
$.ajax ({
Type: "POST",
Async:false,//Set sync mode
cache:false,//Cache
Url:url,
Data:data,
Success:function (data) {
Operation after successful return of value
}
});
The solution is cache:false.