Alex Rivera | Logout

Access control for cross site requests in Internet Explorer

Asked 2010-01-11T20:29:05.907
10

I am trying to make an AJAX call from several domains to a single one which will handle the request. Enabling Cross domain in Firefox and Chrome was easy by setting the header on the handling server:

header("Access-Control-Allow-Origin: *");

But this doesn't help enabling it in Internet Explorer. When I try:

httpreq.send('');

it stops with error Access denied.

How can this be enabled in Internet Explorer?

Edit
Report

1 Answer

0

Just adding to the Eric's answer , for Older version of IE , you can use Jquery 1.4.2's $.ajax method , that by default allows the cross domain requests, or for cross domain JSON , you can use

jQuery.getJSON( String url, Map data, Function callback ) returns XMLHttpRequest

An Excerpt from Jquery docs.

"jQuery now supports JSONP natively - if you attempt to load JSON (via $.getJSON or $.ajax) from a remote URL then an extra callback will be provided for the server to interpret."

answered 2010-08-02T08:20:10.330

Your Answer