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

<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?

10 Answers
10

Leave a Comment