Summary of JQuery ajax return values in IE

Source: Internet
Author: User

This article will introduce some of the problems that sometimes have problems in the return values of jquery ajax in IE browser.

Question 1,

A function of the website. After a parameter is updated using JQuery, another $. get method is used to obtain the updated value, which will become invalid for the second time in IE.

The final problem is that IE uses the last GET returned result cached locally to directly respond to the next request.

You can solve this problem after modifying it to $. post.

Question 2,

Today, we are dealing with the problem of partial page refresh. other browsers are normal, but there is no returned value under IE. After investigation, it turns out that the cache is still cool. Then we add a parameter to the script, as shown below:

The Code is as follows: Copy code

$ (Document). ready (function (){
SetInterval ('wb _ Get () ', 5000 );
});
Function Wb_Get ()
{
$. Get (
"/Index. php? Id = "+ $ (" # video_id "). val () +" & v = "+ escape (new Date ()),
Function (data)
{
If (data)
{
$ ("# Live_list_ul"). prepend (data );
}
}
);
}

The v parameter transmits a value similar to a random number to obtain the latest content.

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.