Good day, I'm having a problem with an ajax query, but when the response is like 4090+ characters lenght then the jQuery ajax function just fails and runs the error function, here is my code:
function loadContent( e) {
currentActiveSlide = e;
var parametros = {
"action" : 'slideContent',
"rel" : e.attr('rel'),
};
jQuery.ajax({
data: parametros,
url: template_url + '/ajax.php',
type: 'post',
success: function (response, e) {
//What ever...
},
error: function(xhr, status, error) {
alert(error);
}
});
}
It doesn't matter what the response data is, I tried adding the 'a' characters 4k+ times and it launchs the error function with the error variable empty.
Any suggestion? - Thanks in advance!
Added data:
It doesn't matter which data is, if for example I send as response the character 'a' more than 4k times 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...' then the function will NOT work, if there are less than 4k then it will work as it should work, but will not if more than 4k characters, so I think there is a limit in the response variable or something like that.