Re: Restoring session after timeout.
Re: Restoring session after timeout.
- Subject: Re: Restoring session after timeout.
- From: email@hidden
- Date: Fri, 02 Dec 2011 10:31:44 -0500
Hi Mahdi,
The session is not just a cookie. It
is a reference to many objects stored in RAM for one user. It's what allows
a web application to "remember" what a user is doing. It can
eat up a lot of resources but is very convenient. That thing you are currently
storing in a cookie is just a "key" it unlocks the "remembered
values in RAM" by using a type of lookup table. You need to spend
some time now to understand this magic.
Because sessions are "expensive"
they generally have a timeout of 15 minutes or so but you can adjust it.
If you don't have that many users and you aren't restarting your apps daily
you could possibly extend the timeout for one week's time but I wouldn't
advise it. This would be a quick fix solution that allows your users to
work on things at their leisure within a "one week" time frame.
But if you have large numbers of users your applications will die due to
lack of RAM. This is the only pain free way to do what you are asking.
When you "timeout" that RAM
is cleared and forgotten forever.
To do what you want would require saving
state in the DB at every page click in your app. That's a lot of thought
and work on your part but it would allow an expired session to "wake
up" if you dotted all your i's and crossed your t's.
When you go "sessionless"
you are often carrying state in your URL. This also takes a lot of work
especially since you have a pre-existing app.
Cheers,
-- Aaron _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden