title: XMLHttpRequest POST data size
body: <p>Is there a size limit to a XHR POST request? I am using the POST method for saving textdata into MySQL using PHP script and the data is cut off. Firebug sends me the following message: </p>
  
  <pre><code>... Firebug request size limit has been reached by Firebug. ... 
  </code></pre>
  
  <p>This is my code for sending the data:</p>
  
  <pre><code>function makeXHR(recordData)
  {
      xmlhttp = createXHR();
  
      var body = "q=" + encodeURIComponent(recordData);
  
      xmlhttp.open("POST", "insertRowData.php", true);
      xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
      xmlhttp.setRequestHeader("Content-length", body.length);
      xmlhttp.setRequestHeader("Connection", "close");
  
      xmlhttp.onreadystatechange = function() 
      {
          if(xmlhttp.readyState == 4 &amp;&amp; xmlhttp.status == 200) 
          {
              //alert(xmlhttp.responseText);
              alert("Records were saved successfully!");
          }
      }
      xmlhttp.send(body);
  
  }
  </code></pre>
  
  <p>The only solution I can think of is splitting the data and making a queue of XHR requests but I don't like it. Is there another way?</p>