Detecting a 302 redirect to an XmlHttpRequest call?

E

enaeher

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
 
J

Jim Ley

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top