•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 427,765 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,704 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 2773 | Replies: 1
![]() |
•
•
Join Date: Jun 2005
Posts: 50
Reputation:
Rep Power: 4
Solved Threads: 0
Sessions DO NOT end when a user closes their browser. There is no communication with the server when a browser is closed so there is no way the server can know to end the session. The same is true when you leave the site for another. Again no communication takes place between your browser and the site you're leaving so the server never knows you've left.
Basically the only solution I know of is to set up a client-side event to call a server-side script to abandon the session when the user leaves.
Anyone knows how to write a javascript to end a session when the browser is being closed?
Basically the only solution I know of is to set up a client-side event to call a server-side script to abandon the session when the user leaves.
Anyone knows how to write a javascript to end a session when the browser is being closed?
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Browser keeps opening on its own (Viruses, Spyware and other Nasties)
- Weird site bechavior closes browser (DaniWeb Community Feedback)
- How to end a session immediately when the browser closes? (ASP.NET)
- howto: expire cookie at end of session? (PHP)
- IE Browser closes shortly after opening (Web Browsers)
- Prosearching.com has hijacked my browser (Viruses, Spyware and other Nasties)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: buttons in html
- Next Thread: IE6 won't open new windows



Linear Mode