We have our authentication delegated to another domain (Window Identify framework, setting up federated authentication). Now, if the session ended before the ajax request, the server redirects the request to the authentication server. Since it becomes a cross call, the ajax request is canceled by the browser. Is there any way to detect this in jquery / javascript?
I looked at the status property of the xhr object, which in this case is set to 0, but is this a good indicator for canceled requests? (I use jquery $ .ajax to create ajax requests)
, , , . , , , , .
:
XMLHttpRequest object readyState. 0 ( "UNSENT" ), , AJAX .
XMLHttpRequest
readyState
, , . , , . , , , , readyState == 0, - , . , .
readyState == 0
jQuery, jqXHR.readyState.
jqXHR.readyState
: http://api.jquery.com/jQuery.ajax/
, , .
(jqXHR, textStatus, errorThrown)
, .