NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Why put state on the server? (Score:1)
Just have the
logoutaction accept areturntoquery parameter, and stick the value of$c->req->uriinto that when you emit the logout link. Much simpler; the server doesn’t have to do any bookkeeping, no DB accesses, nothing.Also, flash is bad anyway – subject to race conditions. It will restore the flashed variables into the session for whichever request happens to come in with the right session cookie, even if that request was made by a different tab/browser window/computer/scraper threa
Re:Why put state on the server? (Score:1)
I usually do something similar if I want to go to some other page after login/logout, but you don't need to prepopulate the login/logout links just use the REFERER header.
Reply to This
Parent
Re: (Score:1)
The referer is rather unreliable and can be, and is often, changed by the browser or a proxy.
Ordinary morality is for ordinary people. -- Aleister Crowley