Resume a session

R

RC

hi,

I now got a session ID.
I want to try to resume a session by closing the current browser and open a
new one. Then pass the session ID in URL query string on new browser to
resume the session that is running at the closed browser.

Is it possible to resume a session like that?
Any sample code provided?

Assume the session haven't timeout yet.

thanks
 
J

Juan T. Llibre

re:
I want to try to resume a session by closing
the current browser and open a new one.

That doesn't work that way.

You must first abandon the session
by calling Session.abandon.

Then, you can't force a user to close a browser
and still be able to redirect the user to a new session.

You can't command the user's browser to open once
you've closed all the windows you were working on.

In general, what happens when you call Session.abandon
is that, if the user's browser isn't closed, a new session will
be spawned with the *same* sessionID as the one which
was just abandoned, but the session data will be empty.

If your user closes all browser windows and navigates
back to your site after Session.abandon was called,
then the user will get a new SessionID.
 
R

Robbe Morris

Not exactly sure what you are trying to accomplish. However,
if your website utilizes cookieless sessions, if someone copies the
url to the clipboard, closes the browser, opens a new browser
session, and pastes the url into the address bar, their session
will resume.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top