Welcome Guest, Not a member yet? Register   Sign In
how to keep the session when browser closed in codeigniter3?
#5

(10-20-2015, 06:15 PM)freddy Wrote: is it tested ? when browser close keep session if i'm not wrong this calling cookie.

Just to be clear: Setting the sess_expiration to 0 will NOT keep sessions when the browser is closed.

Quote:http://www.codeigniter.com/user_guide/li...references

The number of seconds you would like the session to last. If you would like a non-expiring session (until browser is closed) set the value to zero: 0


When a browser is closed all session data is lost. When a new session is started, you can link that session to a user id through the use of a cookie, as I described earlier. 

Data kept beyond a browser close is not session data any more. If you want to keep data beyond a browser close then you need to use something other than sessions, like persistent cookies.

I hope that helps,

Paul.

These might help too:  
http://stackoverflow.com/questions/38042...-they-work
http://stackoverflow.com/questions/12996...wser-close
Reply


Messages In This Thread
RE: how to keep the session when browser closed in codeigniter3? - by PaulD - 10-20-2015, 08:32 PM



Theme © iAndrew 2016 - Forum software by © MyBB