Why am I getting an OPTIONS request instead of a GET request?

http-get, http-options-method, jquery, xmlhttprequest

Solution

The OPTIONS is from https://fetch.spec.whatwg.org/#http-cors-protocol See http://metajack.im/2010/01/19/crossdomain-ajax-for-xmpp-http-binding-made-easy/ for a bit more info

Problem

``` <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js" type="text/javascript"></script> <script> $.get("http://example.com/", function(data) { alert(data); }); </script> ``` 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. 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?

Original source

Related problems