Alternatives
Members may post updates or alternatives to this current article in order to show different
approaches or add new features.
I don't know how feasible this may be, but it occurs to me that you might include a client-side script to periodically whack the server in some way - a "keep-alive" signal. If the browser is closed or crashes, this signal would fail and you could initiate a logoff.
3 Aug 2011Ganesan Senthilvel
I would strongly recommend to follow CWE/SANS TOP 25 Most Dangerous Programming Errors as the best practice solution for your questionSolution reference at: http://www.sans.org/top25-software-errors/2009/[^]
30 Jul 2010Christian Graus
It's impossible. You can't do anything that is guarenteed to work, always. Instead, you need to turn off caching in all your web pages, and make each page check to make sure the user is logged in, or redirect to the login page. There is NOTHING secure about any system that does not do this. ...
Found this while lolling around probably it doesnt matter anymore but just for reference...onbeforeunload Event (BODY, FRAMESET, window, ...)[^]I was wondering why bloody Groove Shark[^] asks me if I want to leave the page or not.
Hi there,I don't know how well this works but when you close a browser it should end the session. When it does, if your using asp.net, the Global.asax class can help. There are methods in it that should be called when a session starts and ends which would allow you to force login/logout....
Hello,I think you can find help towards solving this issue your self with a little help from another post already on this website....Detect browser closing through clicks on the [X] buttonGood luck.
debugger; function doUnload() { if (window.event.clientX < 0 && window.event.clientY < 0) { var objconfirm = confirm("Would you like to save changes made?") if (objconfirm == true) { ...
On design page writeonbeforeunload = javascript function();then call the webservice or pagemethod through jquery ajax methodand In the codebehind method query database and update the login table.This method will definatly work.. I had used it..
22 Dec 2013Er. Tushar Srivastava
Hi friend,Actually, I looked at all the solutions and no doubt they all are great. But just a question? Is it really necessary for the system to keep the person logged in even if he has not been doing any considerable work. For example, I opened up the site, logged into it and then I...
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.