title: JQuery AJAX Not executing on random occasions
body: <p>I am using JQuery's AJAX to send values to my PHP server to interpret and handle these values.</p>
  
  <p>Currently, everything works fine, except on random occasions (every once-in-a-while) it just does not seem to complete/execute the AJAX correctly.</p>
  
  <p>This is the code I use to AJAX with:</p>
  
  <pre><code>$.ajax({
          type : 'POST',
          url : 'setting.php?a=&lt;?php echo $companyid; ?&gt;',
          dataType : 'text',
          data:{old : $old_, newer : $newer_, action : $act_},
          success : function(data)
              {
                       if (data.error === true)
                       {
                         alert("An error has occured, the page will refresh itself.");
                         location.reload();
                       }
                       alert('SET');
              },
          error : function(XMLHttpRequest, textStatus, errorThrown)
              {
                       alert("An error has occured, the page will refresh itself.");
                       location.reload();
              }
      });
  </code></pre>
  
  <p>Every time the AJAX completes, a message pops up with the text <code>SET</code> and I can view the results in a text file created by the PHP file/code. (It writes the values received into a text file for testing purposes)</p>
  
  <p>So every now and then it just doesn't alert me with <code>SET</code> and the text file remains the same as was before that try.</p>
  
  <p>What can I possibly do about this glitch?</p>
  
  <p>Thanks!</p>