Serious Ajax cache problems in IE8

Source: Internet
Author: User
Tags website performance
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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.