Baseline Widely available
Note: This feature is available in Web Workers, except for Service Workers.
The read-only XMLHttpRequest.responseURL
property returns the serialized URL of the response or the empty string if the URL is null
. If the URL is returned, any URL fragment present in the URL will be stripped away. The value of responseURL
will be the final URL obtained after any redirects.
const xhr = new XMLHttpRequest();
xhr.open("GET", "http://example.com/test", true);
xhr.onload = () => {
console.log(xhr.responseURL); // http://example.com/test
};
xhr.send(null);
Specifications Browser compatibility
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4