[Seaside] redirect user if session dead without clicking him at the page itself

Sabine Manaa manaa.sabine at gmail.com
Thu Apr 20 16:04:56 UTC 2017


is anyone having an idea for a solution of this problem:

I want that my seaside web app redirects the user to another page (login
page) if the session is "dead*". The special point I am looking for is:

This should happen ALSO if the user does NOT click on this page or does
something. Also if the user switches to another tab.

So, if he comes back to the browser/to my apps tab, he should see a message
"you have already been logged out".

I assume I have to periodically check if the session is alive and played
around with

html paragraph
            (html jQuery this load
                html: [ :r | "here check for session and if not there,
                    (Array with: self currentPerson with: (self application
sessions includes: self session))
                        inspect ];
                interval: 30 seconds);
        with: [ html render: something].

but if the session is dead, the code "here check ..." is no longer executed.
I am not sure if this is the right idea...
Anyone already implemented something like this?

I am not looking for a redirect after clicking somewhere in the app, I have
this and it works fine.


* I have read a little about "dead" sessions and know that they are
collected away at unpredictable time. With "dead" I mean that if the user
would click at the app, he would be transferred away.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/seaside/attachments/20170420/afdbd5e0/attachment.html>

More information about the seaside mailing list