[Seaside] Session expiry

Amos 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
while using JavaScript to spice up websites is great, sites *should*
work for browsers without it, or with JavaScript disabled.

> > 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
> > second), I'd assumed it was simply JavaScript running on the client
> > (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 :-(
> Sure, using JavaScript. You take one of the many countdown scripts
> from the web, add and initialize it with the session expiry time
> whenever you render a page.
> Lukas

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 mailing list