I am using simple jQuery
$.get( .... );
Here instead of getting GET response I get OPTIONS.( checked in firebug Net)
Same code is working fine in Safari. Looks like some problem with Firefox.
Any workaround / solutions to fix this problem..
Thanks
Kurund
The OPTIONS request method is sent by browsers to find out the supported HTTP methods and other parameters supported for the target resource before sending the actual request. Browsers send OPTIONS requests when they send a CORS request to another origin.
Prevent sending the post data, if it wont be processed This is the only reason what is valid. Using options request will prevent sending the post data to the server unnecessarily.
The GET method is used to retrieve information from the given server using a given URI. Requests using GET should only retrieve data and should have no other effect on the data. Same as GET, but transfers the status line and header section only.
The HTTP OPTIONS method is used to request information about the communication options available for the target resource. The response may include an Allow header indicating allowed HTTP methods on the resource, or various Cross Origin Resource Sharing headers.
The OPTIONS
request what you see is the preflight request, you can read about that here:
It's there because you're requesting a cross-domain XMLHttpRequest so the browser has to check whether your request is allowed on the remote server or not.
There are two solutions to solve the problem (as mentioned above):
OPTIONS
request with the corresponding Access-Control-*
headersIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With