[Seaside] scriptaculous - updater
Ramon Leon
ramon.leon at allresnet.com
Fri Oct 13 17:38:37 UTC 2006
> This I find interesting. Doesn't this mean that if one
> wanted, one could make the expiration cache extremely low
> (e.g. like 30 seconds) and use something like this to ensure
> people who keep their browser open don't lose the session,
> while not having to waste space on sessions for people who
> have already surfed away from the site? And it should be
> fairly simple to make a hidden field in normal html (i.e. not
> javascript) that does this autoupdate transparently (well,
> the user will see a little blue reload every 10 seconds or
> so) to support users who don't have javascript enabled?
>
> Of course it isn't quite this simple. The reason the session
> isn't getting updates may be that the user is surfing a
> different part of the site and will come back later via the
> back button. But with a little work I think something like
> this would be possible. Right?
Yup, I do this for exactly that reason, though I still keep a 10 minute
timeout. As long as the browser stays open, the session remains active.
You don't even need to render anything to the client.
renderSessionKeepAliveOn: html
html script: ((html periodical)
frequency: (self preferenceAt: #sessionExpirySeconds) - 20;
callback: [Transcript show: 'session touch'; cr];
yourself)
Ramon Leon
http://onsmalltalk.com
More information about the Seaside
mailing list