I am making an $.ajax call to an external server. This server returns a redirect, with the redirected page returning some json. This works fine on FF and Chrome, but Safari and Opera don't like it.
Here is my $.ajax code:
$.ajax(
{
url:url,
dataType:"json",
success:function(data)
{
console.log("success");
},
complete:function()
{
console.log("complete");
}
});
In firefox and chrome, this works properly - 'success' is called for each of my ajax responses. In safari and opera however, 'success' is never called, only 'complete'. The network requests console gives me the following information:
resolve.json GET 302 application/json
1817995.json GET (canceled) undefined
Where 1717995.json is the redirection that is sent from resolve.json. I'm not sure why the request is being canceled (as seems to be indicated by the response).
Can anyone give some assistance on this?