How to get final destination URL from AJAX?
Posted
by
Maurice Lam
on Stack Overflow
See other posts from Stack Overflow
or by Maurice Lam
Published on 2011-02-04T07:00:57Z
Indexed on
2011/02/04
7:26 UTC
Read the original article
Hit count: 163
JavaScript
|AJAX
When I do an XMLHttpRequest, I always get redirected automatically to the URL (presumably by the headers of the response). For example, if I query "http://www.stackoverflow.com" I will be redirected to "http://stackoverflow.com".
How can I get that final URL? (http://stackoverflow.com/ in the example)
I checked in the response headers but I cannot seem to find it. (I just used the GET/POST method not HEAD).
© Stack Overflow or respective owner