IE send Ajax request to return to the previous result solution

Source: Internet
Author: User
Tags browser cache

This article mainly introduces IE to send Ajax request to return the last results of the solution, the need for friends can refer to the

Problem arises: 1. IE will only create an AJAX request below, put the response results in the browser cache the next time you call the AJAX request to read the Get mode from the cache, the data is obtained, 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 follows each activation event to recreate an AJAX request solution: 1: After the Ajax-requested page, add a random function, we can use the random time function in the JavaScript sent by the URL after the T=math.random () such as: UR l+ "&" + "t=" +math.random () or new Date ();    After the URL parameter, add "? timestamp=" + New Date (). GetTime (); 2. Code as follows: $.ajax ({type: "POST", Async:false,//Set sync mode cache:false,//cache Url:url, Data:data, Success:fu    Nction (data) {///After successful return of the value of the Operation}}); The solution is cache:false.
Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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: and provide relevant evidence. A staff member will contact you within 5 working days.