Home » Categories » JavaScript

XMLHttpRequest.responseURL

Example

var xhr = new XMLHttpRequest();
xhr.open('GET', 'http://example.com/test', true);
xhr.onload = function () {
  console.log(xhr.responseURL); // http://example.com/test
};
xhr.send(null);


Reference:
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseURL
Article Rating (No Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
 
Attachments Attachments
There are no attachments for this article.
Comments Comments
There are no comments for this article. Be the first to post a comment.
Related Articles RSS Feed
Hidden image after redirect by check filename
Viewed 628 times since Wed, Sep 30, 2020
Strip HTML Tags in JavaScript
Viewed 556 times since Sat, Oct 3, 2020
How to hide image broken Icon using only CSS/HTML?
Viewed 809 times since Wed, Sep 30, 2020
Get The Current Domain Name With Javascript (Not the path, etc.)
Viewed 587 times since Fri, Oct 2, 2020
Regex in Javascript to remove links
Viewed 531 times since Sat, Oct 3, 2020
Check image width and height before upload with Javascript
Viewed 528 times since Mon, Sep 21, 2020