title: Get final url from XHR object after redirect
body: <p>Suppose I use ajax (e.g. via jQuery) to do POST request to an API that implements a PRG pattern. Hence it will redirect me:</p>
  
  <pre><code>POST /some/api
  HTTP/1.1 303 See Other
  Location: /some/other/location
  </code></pre>
  
  <p>jQuery will then automatically follow the redirect and perform a:</p>
  
  <pre><code>GET /some/other/location
  </code></pre>
  
  <p>And then call the response handlers (success, failure, etc) with the output from the latter request. However, how can I read the location of the final resource (<code>/some/other/location</code> in this case) in javascript? </p>