Page 1 of 1

Session life span

Posted: Thu Jun 06, 2002 12:50 pm
by AJB
Hi,
This has been asked before by another but I didn't quite get the answer.

I'm OK creating a session, adding variables.
I'm OK accessing those variables on another page.
I'm OK on removing variables & destroying the session when they get to the last page in the sequence.

Buuut....

What happens when the user clicks "Back," or closes the window half way down the set of pages in the sequence, or clicks "New window" where the browser starts at the same place? Do you end up with un-cleared up sessions littering your server's drive? Do they "expire"? Any advice much appreciated.

Cheers
Tony

Posted: Fri Sep 09, 2005 4:42 pm
by J_Iceman05
when the user presses back, it doesn't reacreate new variables.
if you create a new variable on that page, then it will reassign the variable as if you created it.
if they close the window half way through the sequence the session is gone. those variables have a life span no more than the browser... close the browser = delete variables.
as for opening a new window, im not real sure what happens there, i assume that doing so does create new variables using the same info existing in your current session variables.
doing something in that new window may also edit what those variables are in the current window.
hope this helps, and i'm sure others who know more can fill in the blanks from here...

Posted: Fri Sep 09, 2005 4:43 pm
by feyd
stop necrothreading.