title: clearing session values on browser close
body: <p>I wanted to <code>clear session values on browser close</code>.So i used the below code</p>
  
  <pre><code> &lt;script language="JavaScript"&gt;
  window.onbeforeunload = WindowCloseHanlder;
  function WindowCloseHanlder()
  {
    location.href = 'clear_session.aspx'
  }
  &lt;/script&gt;  
  </code></pre>
  
  <p>In the above code am using a function which determines the closing of the tab of a browser.This code is working fine in IE 8,9,10 and Firefox.But the same code is not working in chrome.I need to know the tab close event in chrome had tried the below code also </p>
  
  <pre><code>chrome.windows.onRemoved.addListener(function (windowId) {
          alert("!! Exiting the Browser !!");
      });
  </code></pre>
  
  <p>Here am using the chrome.windows.onRemoved.addListener to determine the tab closed event in javascript.
      For the above code that is chrome.windows do we need to include any API.Can you please provide the code to determine close event of the tab in Google chrome.. </p>