views:

44

answers:

1

Hi there! I searched the intenrent for the question: "how to keep php session alive, before it times out by jQuery"

I want it being silent - that means, i'd like no poping-up dialogs asking to keep session, but silent ajax request, that will tell server, that client is online. The model is: user logged in, and he is in until he closes the browser

I tried to search, but there is no simple answer, how to make such a simple thing.

Appreciate you for any help

A: 

By default the php session times out when the browser is closed. Check this part of the manual http://php.net/manual/en/session.configuration.php#ini.session.cookie-lifetime.

You can of course add some JavaScript to the event that happens when the window closes, that sends a message to your custom session manager on the server, but I don't see why.

Michael

related questions