I'm using jQuery's ajax() method to make some asynchronous server calls and want to catch the case where a call fails because the session has 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 to jQuery's error callback apparently returns an empty string, and I'm having trouble figuring out any other way of getting that header information.
Is this possible?