Is it possible to extend user’s session expiration time in CI. What I want to do is, by default every user’s session cookie lasts for example 1 day, but every time user visits the site his session expiration time is extended by one more day.
I don’t know if it is a good idea to do this, maybe I should just set cookies life time for like a week and that’s it?
I believe what you want is actually the default behavior.
Take a look at sess_read() and sess_update() in /system/libraries/Session.php
last_activity for an active session is updated every five minutes.
Session expiration is checked with last_activity + sess_expiration < now
So, for the behavior you want, just set your sess_expiration time to 86400 (one day), and you should be all set.