When I run $.get
or .load
in jQuery, the request seems to follow 302 redirects perfectly fine and gives me ultimate response, which I can use in the callback for $.get
or which plugs into the this
element for .load
.
While I obviously have the original URL since I am in control of the string that's entered as the first argument in $.get
or .load
(it would also be helpful if I could get this directly in the callback to simplify things), how can access the final (after redirect) URL in the callback?
I suspect that it would be in the XMLHttpRequest object, for which I have found the specification.