It depend of the exact reason you want the session to terminate after 30 
second.

The javascript mentioned method would work, but would not actually force 
the 30 seconds.  For example, I have NoScript enabled on my end, so the 
timeout would never apply.

You could do it in javascript to display a countdown and disable the form 
after 30 seconds, but on the server side, you might want to check it also.

You could store the unix time into the session variable for when the form 
was generated, and when receiving the POST, check for the time difference 
and display a web page saying they were too late.

Again, it depend on how safe you want that timeout to be.

On Monday, 13 January 2014 02:31:04 UTC-5, Rishi Mukherjee wrote:
>
> Hello,
>
> I give the user to enter values in a form and submit it. If the user does 
> not enter anything till 30 seconds, I want the user to be automatically 
> logged out. What is the best way to do it in web.py? I have used the 
> sessions but cannot really understand how to use it in this context.
>
> Thanks,
> Rishi
>

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/webpy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to