cross domain - jQuery ajax call not working in IE -
i'm trying json remote server using jquery's ajax-function.
var self = $(this); $.ajax({ cache: false, url: *external url*, data: {param: self.val()}, type: 'get', datatype: 'application/json', crossdomain: true, success: function(data, status) { console.log(status); console.log(data); } });
this works fine in chrome, info gets output. in firefox, request sent, no info written console. in ie, phone call not seem sent @ all.
what doing wrong? know cross-domain-blocking, puts me off works in chrome not in other browser.
thanks in advance!
i know cross-domain-blocking, puts me off works in chrome not in other browser.
it sounds server you're requesting info supports cors, maintain in mind different browsers may send different headers along requests, , cors requests fail if browser sends header server doesn't okay. it's exclusively possible chrome sending headers server has approved, , request works, firefox sending header server doesn't approve, , request doesn't work.
unless you're using ie10, ie isn't working because cross-domain requests don't work in ie unless utilize xdomainrequest
object instead of xmlhttprequest
object, , jquery doesn't that. there patches create that, jquery library not. ie10 finally enables cors via standard xmlhttprequest
object.
jquery cross-domain
No comments:
Post a Comment