|
Posted by Jasen Betts on 09/30/73 11:40
On 2006-02-19, Mickey <mickey.allroid@gmail.com> wrote:
> Thanks to all for the replies.
>
>> Now, if you keep the 'last heard from' timestamp in a database, you may
>> release a session based upon a last response time (i.e. fifteen minutes)
>> without having to hear from the browser at all. (i.e. no cookie exchange
>> is required) Its not the same as detecting that they have gone elsewhere
>> but is probably the best you can do.
>
> This is interesting.
> Currently I am storing the 'last heard from' timestamp in a database
> and if the user refreshes their browser and a specified amount of time
> has passed then they are directed to re-login.
> However, if the user closes their browser, I need to be able to clean
> out the database of currently logged on users. I can't do this if the
> user doesn't refresh their browser.
why can't you? all that's needed is
delete from sessions where last_access < now - INTERVAL '0:15:00';
or similar.
> Ultimately, this is what I am trying to do, and also delete this user
> from the list of currently online users. Can this be done once the user
> has left the page or is there a better way to acheive this?
it's hard to determine when a user leaves.
Bye.
Jasen
Navigation:
[Reply to this message]
|