它对该URL进行OPTIONS请求,然后永远不调用回调函数.
it does an OPTIONS request to that URL, and then the callback is never called with anything.
当它不是跨网域时,就可以正常工作.
When it isn't cross domain, it works fine.
jQuery是否应该仅使用<script>节点进行调用,然后在加载时进行回调?我知道我将无法获得结果(因为它是跨域的),但是没关系;我只想打通电话.这是一个错误,还是我做错了什么?
Shouldn't jQuery just make the call with a <script> node and then do the callback when its loaded? I understand that I won't be able to get the result (since it is cross domain), but that's OK; I just want the call to go through. Is this a bug, or am I doing something wrong?
推荐答案选项来自 www.w3/TR/cors/参见 metajack.im/2010/01/19/crossdomain-ajax-for-xmpp-http-binding-made-easy/有关更多信息
The OPTIONS is from www.w3/TR/cors/ See metajack.im/2010/01/19/crossdomain-ajax-for-xmpp-http-binding-made-easy/ for a bit more info
更多推荐
为什么我收到OPTIONS请求而不是GET请求?
发布评论