i have a case where when th开发者_JS百科e user closes the browser window i have to set an Application Object to null...and for this i will use the JavaScript onbeforeUnload to do the server side work.