$.ajax () compatibility issues under IE9

Source: Internet
Author: User

Recently in the lead a project, encountered a little problem, share with you.

Link to the final Bug solution address: Http://stackoverflow.com/questions/5241088/jquery-call-to-webservice-returns-no-transport-error

Finally through this CDN we got a GitHub open source file address: Https://github.com/MoonScript/jQuery-ajaxTransport-XDomainRequest

In this open source project, the author gives us the solution:

Introduce this file in the project, which is the CDN address of this file:

Http://cdnjs.cloudflare.com/ajax/libs/jquery-ajaxtransport-xdomainrequest/1.0.3/jquery.xdomainrequest.min.js

Red section can not, or through the suffix name of your file to query the corresponding HTTP contenttype value, the following link address is the corresponding query table: http://cdnjs.cloudflare.com/ajax/libs/ Jquery-ajaxtransport-xdomainrequest/1.0.3/jquery.xdomainrequest.min.js

If you do not want to write this value, you can omit, do not write is not wrong, write wrong will be error.

After using this new method, there is a new problem, that is, I send back to the background of the JSON parameters passed, and then we will change the JSON pass parameter to the URL pass parameter, so that there is no problem on all browsers.

Before this, I also Baidu a lot of methods, such as time stamp what, the cache is false and so on, have not succeeded.

If you have the same problem as me, hopefully this solution will solve your problem perfectly.

PS: This article wrote for a long time, afraid of writing is not good, has been unable to come out, recently was not busy, to decorate a bit.

$.ajax () compatibility issues under IE9

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.