0

Now I want to send a large data to my server, such as Cookies, I know there is a limitation of the Cookies' size. If I want to send some other data to my server, and the size is larger than 10M, can I do this in AJAX?

xoec
  • 45
  • 10
  • It's possible, what sort of data are you trying to send? – serakfalcon Aug 11 '14 at 06:26
  • Just some text contained characters. – xoec Aug 11 '14 at 06:27
  • wow that is a massive packet of text! I was going to suggest the formData object if it was a picture/video, though if it's just text you can send it with a normal POST request (though you may run afoul of your configuration settings, usually there is a line limiting the `post_max_size`. – serakfalcon Aug 11 '14 at 06:34
  • In general there is no data limit. People do upload files, you know? There are however limits on headers (at least in the HTML spec). And servers may reject too big requests. So it depends. – freakish Aug 11 '14 at 07:23
  • 2147483647 (2GB) that are allowed in a request body. http://httpd.apache.org/docs/2.0/mod/core.html#limitrequestbody – Anja Ishmukhametova May 19 '20 at 01:47

1 Answers1

2

Limitation is set by the server (you can configure it depending on what server you are running on)

If you do go down that route, make sure you consider the request timeout also. Most servers will drop the connection after 1 minute.

rkw
  • 7,287
  • 4
  • 26
  • 39