var xhr = new XMLHttpRequest(); xhr.open('GET', "http://example.com/redirect", true); xhr.onreadystatechange = function () { if (this.readyState == 4 && this.status == 200) { console.log(xhr.responseURL); } }; xhr.send();
var xhr = new XMLHttpRequest(); xhr.open('GET', "http://example.com/redirect", true); xhr.onreadystatechange = function () { if (this.readyState == 4 && this.status == 200) { console.log(xhr.responseURL); } }; xhr.send();