MatTheCat
MatTheCat

Reputation: 18761

Same domain JQuery $.ajax sending OPTIONS as REQUEST_METHOD

My problem is very similar to this one but I don't see why my requests would be cross-domain. Here is what I get with firebug:

domain is same but request method is OPTIONS

All domains are the same, I don't understand why Firefox and IE have this behaviour.

You can test here, just click on one of the three main links to send a request.

Thanks in advance!

Upvotes: 1

Views: 1145

Answers (1)

Pointy
Pointy

Reputation: 414006

It's not just about the domain name. The protocol (http vs. https) has to be the same, the entire host name has to be the same, and the port has to be the same. Some of your links are to "www.tronatic-production.com", but the page loads with just "tronatic-production.com".

Here is a presentation from noted JavaScript expert and hipster extraordinaire Alex Sexton about the Same Origin Policy and ways to deal with it.

edit The reason that your links have "www" prepended is that you've got a <base> tag in your header that's telling the browser to do exactly that.

Upvotes: 2

Related Questions