| | |
How to end a session immediately when the browser closes?
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jun 2005
Posts: 50
Reputation:
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?
![]() |
Similar Threads
- 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
Views: 4993 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for JavaScript / DHTML / AJAX
ajax ajaxcode ajaxhelp animate api automatically beta boarder box bug calendar captchaformproblem card checkbox child class column cookies createrange() css cursor dependent disablefirebug dom download dropdown editor element engine error events explorer ext file firehose flash form forms google gwt html htmlform ie8 iframe image() images internet java javascript jawascriptruntimeerror jquery jsf jsfile jump math matrixcaptcha microsoft mimic mp3 mysql object offline onmouseoutdivproblem onreadystatechange parent passing pdf php player post problem progressbar rated rating regex runtime scroll search select session shopping size sql star stars stretch text textarea twitter validation w3c web website window windowofwords windowsxp wysiwyg xml xspf \n






