[Seaside] Session expiry
aaamos at gmail.com
Wed Jan 2 11:34:45 UTC 2008
> > Thanks, Lukas, I did see similar questions in the archives, but the
> > answer only ever seems to be a workaround, not a complete solution (at
> > least for me). I'll see if I can work out something for myself just to
> > satisfy my own curiosity - hopefully without breaking the framework
> > ;-)
> No, that's a propre solution.
Sorry, I respectfully disagree. And everyone that I've shown Seaside
to, as much as they immediately liked it, the reaction to the handling
of expired sessions is always something that brings up a frown. And
> > However, your comment answers my other question as to why the session
> > expiry time was always equal to the session duration: I hadn't
> > realised that the 'every: 1 second' bit effectively causes a request
> > to the server every second (hence resetting the expiry time every
> > (obviously wrong in hindsight).
> I wouldn't set it to trigger every second. This causes an unnecessary
> high load on the server. A value that is just a bit shorter than the
> expiry time is fine.
The 1 second I mentioned was in regard to the countdown, similar to
the 'Periodical' component like I said. Obviously I wouldn't be
resetting the session time every second... ;-)
> > Which begs the question: is there some other way to show the remaining
> > session time without triggering a request? Otherwise my idea about
> > showing the remaining time is doomed :-(
> from the web, add and initialize it with the session expiry time
> whenever you render a page.
Sounds like that's the only way to do it since sending a request to
the server every second isn't really an option. Thanks, I'll give it a
More information about the seaside