title: onbeforeunload in safari does not run code server side
body: <p>On browser close or F5, I have to perform some code on server side
  For this I have a button.  On click of that button which has onclientclick and onclick functions written.  I also wrote an event on window.onbeforeunload which does a button.click().</p>
  
  <pre><code>window.onbeforeunload=function(e)
  {
     button.click()
  }
  </code></pre>
  
  <p>My problem is that this runs the code of the client side click function of the button, however server side code does not get executed.  This happens only when i close the browser.  When I do F5 it works perfectly.  Also this happens only on Safari.  In FF and mozila it works perfectly .  How can i </p>