var url = 'https://httpbin.org/redirect-to?url=https://httpbin.org/get';
var xhr = new XMLHttpRequest();
xhr.open('GET', url);
xhr.addEventListener('load', () => {
document.getElementById('result').textContent = xhr.responseURL;
});
xhr.send();
It seems that `event.respondWith()` ignores the URL for requests if they are resolved through a redirect (status 30*)