This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
William Brogden wrote:Whats wrong with waiting for the session timeout event?
Nothing, if that is the only thing you want to do. But if you as an example, are coding an online game, you might want to notify all other users that 'Player X went link dead' if you loose the connection or 'Player X closed the browser and gave up'. Then you can't really wait for the session to just die. There might be quite some more logic that needs to be executed on the server side when this things happens.
One thing, if we stay in the game, is that if I am playing a slot machine, and the browser crashes under me when I just hit the Jackpot, I still would want to claim that winning automatically. People tend to be quite annoyed at systems that relies on them to login again an hope that their session can be retrieved based on their user id...