sessions and timeouts

Results 1 to 2 of 2

Thread: sessions and timeouts

  1. #1
    Join Date
    Dec 1969
    Posts
    613

    Default sessions and timeouts

    hi...<BR><BR>i need a way to tell if a user&#039s browser has been closed...<BR><BR>i have a script that i run when the session is terminated (via session.abandon or timeout), but it also needs to run as soon as the browser is closed....<BR><BR>any suggestions?<BR>please email directly at scott@bridgepath.com<BR><BR>thanks<BR><BR>scott

  2. #2
    Join Date
    Dec 1969
    Posts
    2,849

    Default RE: sessions and timeouts

    Sorry, you can&#039t do this. You can write client side script to trigger an event when the window is unloaded (i.e., they navigate to another page), but you can&#039t tell when they close the browser. Imagine that they leave your site, go to Yahoo!, and close their browser then. How do you expect to be able to handle their closing the browser?<BR><BR>I can tell you are finding a reason why Session Variables are Evil! Tee hee! I wrote an article on this topic on 4Guys. The best advice: set a reasonable low Session.Timeout if you have to use Session variables. Better Advice: don&#039t use session variables!<BR><BR>Good luck, man. If you have any further questions, just ask away!

Posting Permissions

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