I'm implementing an image upload web app in Ajax
and there is the crossDomain:false
parameter in a finding example. What is the function of this parameter?
I'm implementing an image upload web app in Ajax
and there is the crossDomain:false
parameter in a finding example. What is the function of this parameter?
In the JQuery concept, the crossDomain:false
parameter defines the behavior if redirects between domains occur on the page called by the method. For example:
www.dominio.com/pagina.html
invokes Ajax method: www.dominio.com/servico.ashx
. www.dominio.com/servico.ashx
returns HTTP 302 Found
pointing to shop.dominio.com/servico.ashx
. If crossDomain:false
, this Ajax call fails automatically.
If crossDomain:true
, this Ajax call is allowed.