[Catalyst] "You have been automatically logged out."

Jonathan Rockway jon at jrock.us
Wed Feb 21 16:17:22 GMT 2007


Ted Carnahan wrote:
> I've been pondering an alternative that uses a JS timeout to do
> something HTML-y, like a div appearing on the side of the window to tell
> them.  This probably still suffers from the "escape cancels timeout"
> issue reported down-thread.

I think the way most people do this is:

1) Do nothing with javascript
2) In /auto, check if the session is timed out
3) If so, print an error message instead of doing the full request

Skip this check for the /login page, obviously.

The idea is to let the user know why their action failed, not to pop up
messages saying "something might fail in the future!"  Plus it's easier
to implement, and works with every browser.

Regards,
Jonathan Rockway

-- 
package JAPH;use Catalyst qw/-Debug/;($;=JAPH)->config(name => do {
$,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //,
";$;"]->[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;->setup;



More information about the Catalyst mailing list