XHR POST size limit

Hi,

I have a problem with XHR size limit. I want to transmit text information for page to a PHP script which saves it in a MySQL database but the data are cut off. When I reload the page the changes I made are gone. Firebug produces the following message:

… Firebug request size limit has been reached by Firebug. …

this is my XHR function:

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 && xmlhttp.status == 200)
{
alert(xmlhttp.responseText);
}
}
xmlhttp.send(body);

}

My question is: Is there a size limit in XHR POST requests? If yes how to disable it or is a browser issue?

regards.

hi,

it works now. the problem was not the post size but my regular expression search term. i also increased my php_max_size but the data will only be around 200K.

thx

The limit will be the same as for regular posts, which depends largely on server configuration (e.g. if you’re using PHP there’s a max_post_size setting).

How large is the data? MySQL TEXT fields are limited to +/- 64K characters, so you might need to use MEDIUMTEXT (size is about +/- 10Mb).

Firebug only displays a certain amount of data, otherwise Firebug itself might crash (dragging the browser down with it).