Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Redirects

0 views
Skip to first unread message

RickMeasham

unread,
Mar 29, 2007, 4:40:02 AM3/29/07
to
I send a request for a document and the server sends back a 302 and a
Location header. The browser then goes and gets that document.

Using XHR, onreadystatechange isn't called until the final document is
found.

This means there appears to be no way to catch the final URL, or even
find out that we've been redirected.

Am I missing something? Is there any way to catch the 302 status so I
can grab the location header before it moves on to the next document?
Is there a way to grab the URL of the final document?

Cheers!
Rick Measham

Christian Biesinger

unread,
Mar 29, 2007, 4:55:04 PM3/29/07
to
RickMeasham wrote:
> Is there a way to grab the URL of the final document?

If you're requesting an XML document, you can check
xhr.responseXML.documentURI, I believe.

0 new messages