Which Action will processed while Clicking Close button of browser?

Which Action will processed while Clicking Close button of browser?

  
I login to the Application and doing some process.Now i m close the Browser without Clicking the Logout.In this case i want to Clear some Session Values in the appiication.For this case where i have to Write the Action.

thanks
I believe that there's no way of detecting such behaviour, so there's nothing you can do.

When the user closes the browser window, that information isn't sent to the server.
That way, there's no way of executing anything based on browser closing simply because your server doesn't know that the client did that.
Hi Devaraj,

Maybe some javascript approach:

<script type="text/javascript">
  window.onbeforeunload = function() 
  {
 //Execute here some "click" on an hidden button to perform your action
  }  
</script>


OR


<script type="text/javascript">
  window.onclose = function() 
  {
 //Execute here some "click" on an hidden button to perform your action
  }  
</script>


By inserting this logic on your header webblock with a hidden button (with property Method=Ajax) pointing to a screen action you may reach your goal.

Regards,
Rafael Pereira