Connecting Tech Pros Worldwide Forums | Help | Site Map

Detecting a 302 redirect to an XmlHttpRequest call?

enaeher@gmail.com
Guest
 
Posts: n/a
#1: Jul 20 '06
Hello,

I'd like to be able to detect whether the browser is receiving an HTTP
status 302 redirect when handling the response to an Ajax call. I can
see the 302 status code clearly with LiveHTTPHeaders in Firefox, but
every time the XmlHttpRequest onreadystatechange handler is called, the
status property is '200'. It seems like the 302 is being handled by the
browser somewhere upstream of my JavaScript.

(I know that this has been asked once before -- that I've found -- in
this group, but it seems like the only response misunderstood the
question.)

Thanks,

--Eli


Jim Ley
Guest
 
Posts: n/a
#2: Jul 20 '06

re: Detecting a 302 redirect to an XmlHttpRequest call?


On 20 Jul 2006 10:17:14 -0700, enaeher@gmail.com wrote:
Quote:
>I'd like to be able to detect whether the browser is receiving an HTTP
>status 302 redirect when handling the response to an Ajax call. I can
>see the 302 status code clearly with LiveHTTPHeaders in Firefox, but
>every time the XmlHttpRequest onreadystatechange handler is called, the
>status property is '200'. It seems like the 302 is being handled by the
>browser somewhere upstream of my JavaScript.
302's are redirected automatically, there's no way to detect it.

Jim.
Closed Thread