For Ajax request I send , if the session is timed out then server is responding with redirection response of "302".In such case my browser is doing a automatic redirection and giving the response of that redirection to my AJAX call.

The problem is I am not able to detect if the response I got is actual or redirected response.

I would like to know if it would be possible in AJAX to detect that the request has been redirected ( 302 response code ).