jQuery AJAX see redirect as status 200 not 302?

Posted by Max Fraser on Stack Overflow See other posts from Stack Overflow or by Max Fraser
Published on 2009-08-12T19:18:29Z Indexed on 2010/04/20 0:03 UTC
Read the original article Hit count: 1288

Filed under:
|
|

I am using jQuery and the jQuery.form plugin to submit my form (also using ASP.Net MVC).

Problem is the user is in a section of the site that uses forms authentication and if their auth cookie expires during their time on the page instead of getting back a status of 302, which would be the redirect to the login page, I still get 200?

In FireBug I see the 302 Found and then my login page is served next as a 200 which is the status code sent back to my Ajax call. How do I detect that they have been logged out if I never see the 302 sent back to the jQuery form plugin?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about asp.net-mvc