title: Is it possible to get the Set-Cookie value from an HTTP response header in JavaScript?
body: <p>I'm using <a href="http://api.jquery.com/jQuery.ajax/" rel="noreferrer">jQuery's <code>ajax()</code> method</a> to make some asynchronous server calls and want to catch the case where a call fails because the session has timed out.</p>
  
  <p>From looking at the response headers in this case, I see that they include</p>
  
  <pre><code>Set-Cookie: SMSESSION=LOGGEDOFF
  </code></pre>
  
  <p>which seems like a pretty reliable test. But calling <code>getAllResponseHeaders</code> on the <code>XMLHttpRequest</code> object passed to jQuery's <code>error</code> callback apparently returns an empty string, and I'm having trouble figuring out any other way of getting that header information.</p>
  
  <p>Is this possible?</p>