[Seaside] session and cookies?
leandromperez at gmail.com
Thu Aug 30 15:50:52 UTC 2007
Please consider this situation:
A user enters the site (a WASession is created) then the user logs in (a
User model object holding some information is stored in the session, in an
instance variable), does some work, and:
1-leaves the page, i.e. he goes to another web site
2-close the tab holding the page
3-close the browser
4-logs out and then leave.
Whenever the user re-enters the site, another WASession is created (AFAIK)
which hasn't got the user information (the user instance variable is nil).
This is ok in the case 4, because no user is logged in. But in the cases
1-3, when the user comes back, the system should recognize him and his
information should be available in the current session because, actually, he
is still logged in.
If the original session hasn't expired, it could be reassigned so the user
information is available. Another solution would be working with another
session but setting its user variable to the one the original session had.
so.. the question would be..
What is the best way to achieve this, cookies maybe?
If so, should I consider session-only-cookies vs permanent cookies? (because
of the difference between cases 1,2 and case 3)
Thanks a lot,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside