JQuery Ajax Cross Domain Call And Permission Issue
Solution 1:
Set the dataType to "JSONP" on your $.ajax() call. You'll have to make sure the response is properly formatted for it to work. Wikipedia has a good section on JSONP.
Solution 2:
Ajax doesn't go cross domain. Your best bet is to create a php page on the local domain that does the check, and go to -that- with your ajax call.
Solution 3:
To get cross-domain AJAX via jQuery, you might want to check this out: http://github.com/jamespadolsey/jQuery-Plugins/tree/master/cross-domain-ajax/
Solution 4:
Almost modern browsers are now supporting cross domain with CORS protocol, so you can use Ajax jQuery to do your job without editing anything in your script code. The change is into your server, you need to enable your server with CORS. It's just the job with adding header fields in each responses to client to support CORS protocol. See an implementation example here.
http://zhentao-li.blogspot.com/2013/06/example-for-enabling-cors-support-in.html
Post a Comment for "JQuery Ajax Cross Domain Call And Permission Issue"