When I use an ajax GET method, is there a size limit for the return value?
If so, is this limit due to JavaScript/jQuery? To the browser? to the server?
I have seen older articles (5+ years old) that seem to indicate that there was a size limit, but I couldn’t find any recent information on this topic.
The HTTP protocol does not limit the size of any response, and neither does jQuery itself. So theoretically speaking, you can make your GET response as big as you want.
In practice, however, there are some constraints: the web server may have a maximum response size (especially when you’re caching entire responses), server code may need intermediate processing steps that require additional storage, the client needs to store the response data somewhere before processing it, the javascript implementation on the browser may have extra memory constraints (you don’t want a rogue script eating up all your physical RAM: that would be a severe security problem). How much exactly is too much is pretty hard to pinpoint though: a few megabytes are probably OK, a terabyte certainly isn’t.
Note that the request method is pretty uninteresting in this context; the above issues are just as valid for responses to POST requests, or any other HTTP verb.