Session.expire early

Results 1 to 5 of 5

Thread: Session.expire early

  1. #1
    Daniel Root Guest

    Default Session.expire early

    Is there any way to automatically expire a single session when the user closes his browser window. Perhaps by useing page_onBeforeUnload to call a "session close script"? How would that close script work?<BR><BR>-Daniel

  2. #2
    Join Date
    Dec 1969
    Posts
    99

    Default RE: Session.expire early

    the session automatically expires when All Instances of a browser are closed.But If you want to abadon a session You can use <BR>Session.abandon<BR>

  3. #3
    Steve Marlowe Guest

    Default RE: Session.expire early

    maybe this is a big hastle and waste of time for the small benefit that you may recieve, but what if you used client side script in the unLoad even of the body to open a new small window that was an asp page that did the session.abandon and then closed itself. the user might see a blink as the page opened and closed but other than that they may not even notice it. would that do the trick? i&#039m asking here...i have never really tried this. the other question i have is...once you call the session.abandon if the user continues to stay on your server in the particular application or whatever does the server create a new session for them? say you abandon the session and the user goes to another page in your app..is a new session started or does the user go without a session?

  4. #4
    Join Date
    Dec 1969
    Posts
    99

    Default RE: Session.expire early

    Yes a new session is started for the user and session remains as long as the browser instance is open or session.abandon is called


  5. #5
    Saint_N Guest

    Default RE: Session.expire early

    Some might disagree, but I think in that case I would use a Session variable.. set it during your LOGin process equal to something unique.. then On your pages add a little sss to see if it equals (or does not equal) "". then just response.redirect back to your logon..<BR>You WILL start a new session if you timeout.. but itll send you back to the logon..<BR>-The Saint<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •