Robert,

>> I already blogged about 2 straightforward approaches:
>> http://blog.pengoworks.com/blogger/index.cfm?action=blog:605
>>
>> And example code:
>> http://www.pengoworks.com/workshop/jquery/session_expired_example.cfm
>>
>> All of this is pretty easy to integrate into your site's JS framework so
>> it's handled consistently across the board.
>>
>> -Dan
>>
>
>your solution, working with response headers is nice. i think one part
>of the question is: how can that be done global in the application.
>looking at the docs, there seems to no hook for that:
>http://docs.jquery.com/Ajax_Events, since the local defined callbacks
>are evaluated first. there certainly is a possibility to overide
>something in the ajax object...

Actually if you use the 403 - Forbidden HTTP response status code, then it
should trigger the ajaxError() event:

http://docs.jquery.com/Ajax/ajaxError#callback

This means you could really easily add a check to see if the status code is
403 and then handle things appropriately.

-Dan

Reply via email to