[Dojo-interest] No answer

sam foster potatosculptor at gmail.com
Thu Mar 25 10:34:44 EDT 2010


We figured this out in #dojo. Requests using XHR (e.g. dojo.xhrGet)
*must* be to resources on the same host and same port as the
originating page. Same host different port counts as "cross-domain".
When you make a cross-domain request with XHR in Firefox, it issues an
OPTIONS request to attempt to authenticate(?) the request. Dojo
provides several options for ajaxy cross-domain requests, for simple
GET requests the typical solution is to use dojo.io.script, which is a
JSON-P implementation. All such techniques do need some cooperation on
the server-side though to get the response payload into the right
shape for the script callbacks to succeed.

The other option of course is to proxy the requests on the server,
using either something like a reverse proxy configuration in apache,
or having a script on the page's domain that requests and relays the
remote resource for you.

/Sam

On Thu, Mar 25, 2010 at 11:45 AM, Unna <a1650216 at owlpic.com> wrote:
>
> I found a difference of the two requests:
> Dojo makes a request with Method Options and the browser directly make a GET
> Request. Is that a normal behauvior or maybe an error of Dojo?
> --
> View this message in context: http://n3.nabble.com/No-answer-tp519721p519846.html
> Sent from the Dojo Toolkit mailing list archive at Nabble.com.
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://docs.dojocampus.org
> Dojo-interest at mail.dojotoolkit.org
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>


More information about the Dojo-interest mailing list