Can ArcGIS work with CORS when using IE 10?

4137
2
Jump to solution
04-13-2015 07:16 PM
BlairJones
New Contributor III

Microsoft says IE 10+ is CORS enabled. XMLHttpRequest enhancements (Windows)

"Internet Explorer 10 adds support for Cross-Origin Resource Sharing (CORS) with respect to the XMLHttpRequest (XHR) object."

My site works with  CORS as expected using latest Chrome, Firefox and Opera browser; but not with IE 10 or IE 11;  IE works when web page originates from same server as ArcGIS therefore not using CORS.

Can anyone describe steps done to get ArcGIS running under IIs7 server to work using CORS with queryTask and IE10 , or IE11 browser?

Thanks and Good Health! Blair

Another day and, perhaps, another insight. It seems that CORS is working with IE and ArcGIS.  But I am not sure ArcGIS is working properly under IE.  I have several feature layers for which I construct and execute queryTask functions. This works cross-domain using Chrome, firefox, and Opera with no errors detected.  But in Cross-Domain using IE 10 only one of the queryTasks completes; when I run the same code from the ArcGIS server using IE non-CORS all the queryTask functions complete.  I'll try coding the queryTask fucntions as a sequence where one finishes before the next is executed and see if that makes any difference to IE.  I'll report back.

Thanks and Good Health! Blair

0 Kudos
1 Solution

Accepted Solutions
BlairJones
New Contributor III

More trial and error:  Seems the CORS component is NOT the problem.  I can use jQuery to $.getJSON using  either plain JSON, or by including "?callback=?" in the URL, JSONP.

It seems that IE 10 and ArcGIS CORS works about the same as ArcGIS proxy which, for me,  is poorly.  I construct layers dynamically and then loop through each layer generating a queryTask for each.  The result is supposed to build dynamically on the browser page ( which it does in every browser except IE ).

Using IE, when I create and add new feature layers before the earlier layer has finished loading, then the map does not display properly.  This process works correctly in other browsers.

When I delay between each additional new feature layer, then IE10 displays properly.

My "click map" function is supposed to report feature layer values within a buffer of the click point.  This is the loop for each feature layer that creates a new queryTask and builds the web page dynamically.  This works well in all browsers except IE.

When I insert a javascript alert function in the loop for each feature layer, then the report completes correctly in IE.;  in my humble opinion, there seems to be something amiss in the way ArcGIS JavaScript API  handles data requests when run from IE.

CORS support for IE10 in ArcGIS is not a problem.

View solution in original post

0 Kudos
2 Replies
BlairJones
New Contributor III

Update;  After spending multiple hours I have found no useful solution;  my application under IE running from the ArcGIS server  ( no CORS ) runs flawlessly while the same code running from another server using CORS runs poorly; fails to update images properly; and then IE crashes.  It is not just the queryTask functions, but also adding and removing feature layers. It is as if resources used by IE for CORS are severely limited or not properly recycled and ArcGIS crashes IE. The same URL that crashes  IE runs flawlessly under Firefox, Chrome, and Opera using CORS.

Thanks and Good Health! Blair

0 Kudos
BlairJones
New Contributor III

More trial and error:  Seems the CORS component is NOT the problem.  I can use jQuery to $.getJSON using  either plain JSON, or by including "?callback=?" in the URL, JSONP.

It seems that IE 10 and ArcGIS CORS works about the same as ArcGIS proxy which, for me,  is poorly.  I construct layers dynamically and then loop through each layer generating a queryTask for each.  The result is supposed to build dynamically on the browser page ( which it does in every browser except IE ).

Using IE, when I create and add new feature layers before the earlier layer has finished loading, then the map does not display properly.  This process works correctly in other browsers.

When I delay between each additional new feature layer, then IE10 displays properly.

My "click map" function is supposed to report feature layer values within a buffer of the click point.  This is the loop for each feature layer that creates a new queryTask and builds the web page dynamically.  This works well in all browsers except IE.

When I insert a javascript alert function in the loop for each feature layer, then the report completes correctly in IE.;  in my humble opinion, there seems to be something amiss in the way ArcGIS JavaScript API  handles data requests when run from IE.

CORS support for IE10 in ArcGIS is not a problem.

0 Kudos