Is there a size limit on the data returned by an Ajax request?

I had this problem in Chrome browser.

I am using jquery ajax post. Ajax is expected to return a very long raw html.

When I do this in FF3 and IE8, it works fine. But in chrome, the data seems to be truncated.

+3
source share
3 answers

As I know, there is a 4kb limit. However, it also depends on the browser.

+1
source

I don't have many details about raw HTML, but I would like to share what I found true in the applications I was working on:

  • There is no limit to the amount of data you receive through an AJAX request.
  • , , -
  • HTML- script, , div . , script body .

, HTML

+1

, - . -, .

I would recommend using iframe to store HTML and using ajax to control iframe source. When you need to download the HTML code, just specify javascript in the iframe at the URL that this HTML code will generate. This way you are limited only by regular timeouts and HTML request size limits, and not (sometimes) by more restrictive ajax restrictions.

0
source

Source: https://habr.com/ru/post/1726035/


All Articles