Re: Intercepting redirects in XMLHttpRequest

Heikki Toivonen <[email protected]>
Newsgroups gmane.comp.mozilla.devel.xml
Organization Another Netscape Collabra Server User
Message-ID <[email protected]>
> I am trying to write an extension that makes use of XMLHttpRequest - the 
> reason I want to use this is because I need to send extra headers to the 
> server when I make the requests. Occasionally, the reply will be a 302 
> redirect which I want to intercept and make the current window navigate to 
> that url.  I can't see any way of doing this.

XMLHttpRequest will automatically follow redirects. So I guess in your
situation you need a way to figure out from the returned data if there
was a redirect and then navigate the current window if so.

-- 
  Heikki Toivonen
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.