Detecting a 302 redirect to an XmlHttpRequest call?

Discussion in 'Javascript' started by enaeher@gmail.com, Jul 20, 2006.

  1. Guest

    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
     
    , Jul 20, 2006
    #1
    1. Advertising

  2. Jim Ley Guest

    On 20 Jul 2006 10:17:14 -0700, wrote:

    >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.
     
    Jim Ley, Jul 20, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Laszlo Zsolt Nagy

    Re: httpconnection class handle 302 redirect?

    Laszlo Zsolt Nagy, Dec 7, 2004, in forum: Python
    Replies:
    0
    Views:
    1,034
    Laszlo Zsolt Nagy
    Dec 7, 2004
  2. ThunderMusic
    Replies:
    1
    Views:
    417
    bruce barker
    Jan 26, 2007
  3. Jeff
    Replies:
    2
    Views:
    533
  4. David Morgan
    Replies:
    1
    Views:
    342
    raj chahal
    Feb 24, 2006
  5. Chris McMahon

    Net::HTTP::Put with 302 redirect?

    Chris McMahon, May 21, 2007, in forum: Ruby
    Replies:
    1
    Views:
    352
    Brian Candler
    May 21, 2007
Loading...

Share This Page