title: Lost connection does not return error with jQuery AJAX on live site but on dev?
body: <p>I am using the following code to post data from a asp.net 2.0 site to an asp.net 2.0 web service that post the data to a server:</p>
  
  <pre><code>$.ajax({
      type: "POST",
      url: "SynchroniseCustomers.asmx/synchroniseCustomers",
      data: JSON.stringify(customerObj),
      contentType: "application/json; charset=utf-8",
      dataType: "json",
      error: function (xhr, status) {
          // If not successfull
      },
      success: function (msg) {
          deleteCustomer(customer.id);
      }
  });
  </code></pre>
  
  <p>I have a JavaScript function to check if I have connection or not, if I have I run the synchronisation (pulling data from web kit browser local database):</p>
  
  <pre><code>function checkConnection() {
      var i = new Image();
      i.onload = synchronise;
      i.onerror = fail;
      i.src = 'http://myurl.com/ping.gif?d=' + escape(Date());
      setTimeout("checkConnection()", 60000); // Execute every minute
  }
  </code></pre>
  
  <p>Thing is, if I run this locally and drop my internet connection the web service returns a 500 error (like I want it to do) and deleteCustomer(customer.id); is not called. However, on the live site if I drop my connection the web service does not return an error and deleteCustomer(customer.id); is called even if I don't have a connection to the internet (customer gets deleted from local database without being posted to the web server).</p>
  
  <p>What's the reason for this? Please let me know if you need more code.</p>
  
  <p>Thanks in advance.</p>