CodeIgniter Forums
session behavior - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: session behavior (/showthread.php?tid=33341)



session behavior - El Forum - 08-23-2010

[eluser]Ajaxian64[/eluser]
Hi All,

I read the Session Documentation and I have a question regarding life time of session.
Maybe I have some trouble to understand the doc description.


Consider I have a
Code:
sess_expiration
set to 7200 (2 hours)

If I work 3 hours on my web app, will be there a session expiration (after the 2 hours)
OR
Session is maintained all the time I work on the web application (because I load pages)

Thanks


session behavior - El Forum - 08-23-2010

[eluser]WanWizard[/eluser]
The session cookie is updated every time you call $this->session->sess_write(), which happens automatically every time you call a session method that updates a session variable.
If you don't do that, the cookie also gets updated every call to sess_update(), which rotates the session_id. This happens once every 'sess_time_to_update' seconds.

So basically it's an inactivity timer.


session behavior - El Forum - 08-23-2010

[eluser]Ajaxian64[/eluser]
Many thanks.
It's clear