I wonder how the session works in CodeIgniter. Isn't a session considered automatically disconnected when you close your browser? CodeIgniter does not destroy the session in the default browser:
$config['sess_expire_on_close'] = FALSE;
Instead, we can set the session end time:
$config['sess_expiration'] = 7200;
Now, for example, if I set the expiration time to 0, it will maintain the session until I destroy it myself:
$this->session->sess_destroy();
So, how does CodeIgniter store session information for a certain amount of time, even after closing the browser?
In addition, is it safe to use this default option (non-expiring session with closing the browser) in order to maintain user registration for several days? (e.g. store in the session 'logged_in' => TRUE )
Roman source share