Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maximum size of ajax returned data

Tags:

Fellow coders, I have asked this question before but did not get a conclusive answer to it. The question is: how much data can i safely return from and ajax post call before i run into some limitation somewhere?

The scenarios are basically like this: front-end makes an ajax call to a php controller/model. the controller returns a bunch or rows from the database or returns some html representing some report which will be stored in a js string var to be displayed later.

I see two limitations here: the size of the data returned through the ajax call and max size the js var can hold.

Anyone knows what the limits are?

thanks

like image 923
djeetee Avatar asked Sep 12 '11 19:09

djeetee


1 Answers

See this answer: Javascript maximum size for types?

In short, unless the browser specified otherwise, variable sizes are not subject to a restriction. As for Ajax: There's no limit, unless defined server-side (such as this one).

like image 74
Rob W Avatar answered Sep 28 '22 04:09

Rob W