How to determine if async request form ajax form was redirected? In my case request is redirected to login page if user's session is closed.
I tried to check arguments of OnComplete, OnSuccess and OnBegin events (OnFailure is not called) but no one helped.
Currently I have entire Login page embaded in the div of current page in case of session closing.
The only way I see how to awoid this - is code like this:
function onSuccessPost(a,b,c) {
if (a.indexOf("<!DOCTYPE html>") == 0) {
window.location = window.location;
}
// ...
}
But this solution seems a bit ugly.
Any ideas?