What keeps a php session alive? -
are sessions kept alive each time access page session_start();
or other pages keep alive too?
example (with 30 minute timeout):
1
user accesses page session_start();
25 mins later access session_start();
page session stays alive
2
user accesses page session_start();
25 mins later access non-session_start(); page
session stays alive
is 2 true ?
there session cookie set in browser whenever access page has session_start()
. cookie name phpsessid
if website using php(although name can changed). session cookie contains session id helps browser maintain session server.
you can check manually browsing website has session , delete browser cookies, session lost.
in case both 1 & 2 correct.
2 correct because user has accessed page has session_start()
, session id set next 30 mins , present if accesse page not have session.
note: page visiting if contains session_destroy()
, session destroyed.
Comments
Post a Comment