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