title: jQuery $.ajax POST Request with IE 9 results empty array
body: <p>I have a problem with my Coding, so in Firefox it works fine but in IE9 it only works for the first ~5 seconds. After that time i don't receive any POST Data anymore.</p>
  
  <p>I want to load a PHP page via AJAX using the values of form inputs as POST variables.
  The first 5 seconds i can receive the POST on the requested page but after that i only receive an empty string.</p>
  
  <p>Here is my Code:</p>
  
  <pre><code>function reload_form(){
  var data = $("#formularfelder").serialize()
      $.ajax({
          type: 'POST',
          url: 'content/formular.php',
          data: data,
          success: function(msg) {
               $("#form_container").html(msg);
          }
      });
  }
  </code></pre>
  
  <p>Is it a bug of IE9 and is there a workaround available?</p>
  
  <p>It would be awesome if you could help me! :)</p>
  
  <p>******EDIT****</p>
  
  <p>I found the reason for this issue at this post:</p>
  
  <p><a href="https://stackoverflow.com/questions/4796305/why-does-internet-explorer-not-send-http-post-body-on-ajax-call-after-failure">Why does Internet Explorer not send HTTP post body on Ajax call after failure?</a></p>
  
  <p>IE runs into a keep-alive timout and doesn't send the body within the POST data anymore.</p>
  
  <p>To workaround this problem I send a packet in regular time intervalls (equal to the keep-alive timeout) to the server to keep the keep-alive. This will cause a little bit traffic (~200 Bytes per refresh) but it's still a more practicable workaround then disabling the keep-alive in Apache. </p>
  
  <p>This was the only solution I found for this problem</p>
  
  <p>For someone with the same problem here's my refreshing Code for a keep-alive timeout of 5 seconds:</p>
  
  <pre><code>var updateDiv = function ()
  {
      $.ajax({type: 'POST', url: 'timeout.php'});
      yourTimer = window.setTimeout(updateDiv, 5000);
  }
  
  $( document ).ready(function() {
      var yourTimer = window.setTimeout(updateDiv, 5000);
  });
  </code></pre>