Welcome Guest, Not a member yet? Register   Sign In
How to clear CI session cookie as soon as the browser is closed?
#2

[eluser]Phil Sturgeon[/eluser]
You need to set the number of seconds before session expiry in config.php as CI stores sessions in a cookie. That means they can last for a very long time by default (0 = unlimited) so set 3600 to log them out 1 hour of inactivty for example.

If this is not good enough, you could use one of the third-party session libraries that use native PHP sessions (which will expire when you close the browser).

The CI team have good reason for using cookies over sessions (server inconsistencies being and lack of control to name a few) but if you NEED to use normal sessions, there is plenty of help to do so on the wiki and around the forums.


Messages In This Thread
How to clear CI session cookie as soon as the browser is closed? - by El Forum - 01-26-2009, 08:11 AM



Theme © iAndrew 2016 - Forum software by © MyBB