title: doing an ajax call on window.unload
body: <p>In my application, there's an object that needs to be ajaxed back to the server before the user switches to another page or closes his browser.</p>
  
  <p>For the moment, I'm using something like this:</p>
  
  <pre><code>$(window).on('unload', function () {
      $.ajax(....);       
  });
  </code></pre>
  
  <p>Will the ajax call fire in all browsers or are there situations where this will not work and where this situation needs to be handled differently? I don't need to deal with anything in terms of a success function, I'm only concerned about the information making it to the server.</p>
  
  <p>Thanks.</p>