I am using the jQuery ajax() method to make some asynchronous server calls and want to catch the case where the call failed because the session timed out.
From looking at the response headers in this case, I see that they include
Set-Cookie: SMSESSION=LOGGEDOFF
which seems like a pretty reliable test. But calling getAllResponseHeaders on the XMLHttpRequest object passed in to jQuery error , the callback apparently returns an empty string, and I am unable to figure out any other way to get this header information.
Is it possible?
source share