title: window.onbeforeunload works when close tab, but doesn't work when close browser
body: <p>Sorry mi english.</p>
  
  <p>I'm using Firefox 38, JSF 2.0, Primefaces 4 and Primefaces Extensions 1.2,  in Chrome works perfectly</p>
  
  <p>my code is</p>
  
  <pre><code>window.onbeforeunload = function(){ rcCloseWindow(); };
  </code></pre>
  
  <p>I need to call a managed bean method ONLY when browser is closed </p>
  
  <pre><code>&lt;pe:remoteCommand name="rcCloseWindow" actionListener="#{loginManagedBean.whatever}" async="true"/&gt;
  </code></pre>
  
  <p>This works in firefox when i close tab, but not when i close browser, in Chrome works perfectly</p>
  
  <p>Any idea? Thanks.</p>