[jQuery] url of ajax response?
I make a request with jQuery.ajax(), to which the server responds with
"302 Found" and a "Location: ..." header
A second request to the new URL is then made automatically
In my JavaScript, I need to know the new URL, but can't figure out
how : (
I don't think I can get the value of the "Location: ..." header
because XHR getResponseHeader() doesn't return headers from the first
response, only the second
I tried listening to onreadystatechange, but at no point did
getResponseHeader() return the "Location: ..." header
I can't figure out how else jQuery or XHR expose the URL
I know the original URL, it was the value I passed to jQuery.ajax(),
but don't think I can get the URL from which the response was finally
requested?