title: jQuery AJAX Calls Crashing IE9
body: <p>My app makes many AJAX calls via jQuery back and forth to my PHP files, which gather data from my DB and return it back. </p>
  
  <p>When testing the app in Google Chrome, everything works fine and the AJAX calls <strong><em>never</em></strong> fail/freeze/timeout. However, when testing in IE9, the AJAX calls will <strong><em>randomly</em></strong> fail about 5-10% of the time and freeze up IE for about 30-45 seconds. It eventually "unfreezes" and either finishes the call successfully or just fails.</p>
  
  <p>Here is my jQuery:</p>
  
  <pre><code>var d = new Date();
  
  $.ajax({
      url: 'forms/settings/scripts/get-client.php?_='+d.getTime(),
      dataType: 'json',
      timeout: 5000, 
      type: 'POST',
      async: false,
      success: function(data){ 
          // do something with data
      },
      error: function(x, textstatus, m){
          if(textstatus==="timeout") {
              alert("Error! Timed out in 5 seconds (forms/settings/scripts/get-client.php). Please try again.");
          }
          else {
              alert("Error! There was a problem contacting (/forms/settings/scripts/get-client.php) for processing. Contact Support! "+textstatus);
          }
      }
  });
  </code></pre>
  
  <p>Here is <code>get-client.php</code> which the AJAX above is calling:</p>
  
  <pre><code>&lt;?php
  define('INCLUDE_CHECK',true);
  require '../../../php/db_pdo_connect.php';
  
  // set JSON array to return
  $jsonArr = array('errorsExist' =&gt; "N");
  
  try {
      // Begin a transaction, turning off autocommit
      $PDO-&gt;beginTransaction();
      // Select Client ID Length into JSON Array
      $jsonArr["clientID_len"] = $PDO-&gt;query('SELECT clientID_len FROM tbl_global_settings WHERE id = 1')-&gt;fetchColumn();
      // commit the queries
      $PDO-&gt;commit();
  } 
  catch (PDOException $e) {
      // Echo back JSON
      echo '{"appError": "'.$e-&gt;getMessage().'", "errorsExist":"Y"}';
      // rollback the transaction
      $PDO-&gt;rollBack();
      // End all PHP processes
      exit();
  } 
  
  // Echo back JSON array
  echo json_encode($jsonArr);
  
  ?&gt;
  </code></pre>
  
  <p>As you can see, I've set a timeout of 5 seconds which is never hit when IE freezes up. Also, I append a date/time string to the URL to prevent IE caching.</p>
  
  <p>Any ideas on what could be causing this? Does IE just suck or am I doing something wrong?</p>