title: Ajax request with JQuery on page unload
body: <p>I'm trying to do this:</p>
  
  <pre><code>$(window).unload( function () { 
  
  $.ajax({
      type: "POST",
      url: "http://localhost:8888/test.php?",
      data: "test",
      success: function(msg){
           alert( "Data Saved: " + msg );
      }
  }); 
  alert (c);
  });
  </code></pre>
  
  <p>However, the success alert is never shown, nor does this request seem to be even hitting the server. What am I doing wrong?</p>