'No Transport' Error w/ jQuery ajax call in IE 'No Transport' Error w/ jQuery ajax call in IE ajax ajax

'No Transport' Error w/ jQuery ajax call in IE


I tested this on Windows Mobile 7.

After LOTS of time spent to understand, I finally found this:

http://bugs.jquery.com/ticket/10660

The Solution is simple, just set this:

$.support.cors = true;

and Ajax cross domain requests will work!


jQuery.support.cors = true;$.ajax({  crossDomain: true,  url: "",  type: "POST",  dataType: "xml",  data: soapMessage,});

you need to make the cross domain value to true


This problem has been bugging me for some time. As a workaround I use proxy scripts located on the same site. Such scripts simply execute server-to-server non-ajax HTTP request (think of curl and WinHttp.WinHttpRequest) and pass status and data back to the caller. It works, but obviously not very efficient because it has to perform two HTTP requests.

In my case, solution is a combination of all the things described above plus 'Access-Control-Allow-Origin' header.

$.support.cors = true; // this must precede $.ajax({}) configuration$.ajax({  crossDomain: true, // added in jQuery 1.5  headers: {    'Access-Control-Allow-Origin': '*'  },  ...});

The web service that answers these calls also responds with 'Access-Control-Allow-Origin: *' header.