javascript - Determining what jQuery .ajax() resolves a string of redirects to -
i'm aware redirects followed automatically, , have little/no control on process. fine, i'm still interested in request ends up. possible see url request ends at? i not want rely on returned html tell me am. sample code: var originalurl = '/this/will/be/redirected'; $.ajax({ url: originalurl, datatype: "html", success: function(data, statustext, jqxhr) { var endpointurl = insertmagichere(); alert("our query " + original + " ended @ " + endpointurl + "!"); } }); i'm looking around in jqxhr it, no luck far. (though, i'm new this, right under nose) so far know (and have testet) possible detect if there has been redirect , how many redirects made (but not where). you can have code: var xhr = $.ajax({ url: originalurl, datatype: "html", success: function(data, statustext, jqxhr) { console.log(data); console.log(statustext); console.log(jqxhr....