-1

Is there a limit such as 65,535 or 32,767 on how many characters can be sent to a server via a textarea in an HTML form? Update: via POST only

I want to develop a way for my users to upload large amounts of text (say 1 million characters) by allowing them to cut and paste on their computers, instead of uploading files.

I don't care about non-modern browsers. Chrome, Firefox, IE10 are fine (preferably IE9 too).

Update: I don't mean the title question literally. I just need to know if the limit is less than say 100 million or 1 million. There will likely be browser-specific limits on pasting a few GB of text into a textarea. It will likely be interesting to know, but may be not worth the effort.

6
  • Via POST, GET or both? Commented Aug 15, 2014 at 0:06
  • @j08691 thanks. POST only. (updating question) Commented Aug 15, 2014 at 0:09
  • Check this link: viralpatel.net/blogs/… Commented Aug 15, 2014 at 0:29
  • @Jatin I am afraid you did not understand the question (or perhaps the blog post you linked to). Commented Aug 15, 2014 at 0:35
  • Is this information being stored in a database? If so you could run into limits there, don't remember specifics off the top of my head. Commented Aug 15, 2014 at 5:24

1 Answer 1

1

I did not find much info on a browser-imposed limit on textarea content, which leads me to believe that there is none. Therefore it now depends entirely on the method you use to send the data. A simple Google search revealed all you need to know.

GET

According to the RFC:

The HTTP protocol does not place any a priori limit on the length of a URI. Servers MUST be able to handle the URI of any resource they serve, and SHOULD be able to handle URIs of unbounded length if they provide GET-based forms that could generate such URIs. A server SHOULD return 414 (Request-URI Too Long) status if a URI is longer than the server can handle (see section 10.4.15).

Note: Servers should be cautious about depending on URI lengths above 255 bytes, because some older client or proxy implementations may not properly support these lengths.

Not a hard-and-fast limit, but a good recommendation.

POST

If you have access the php.ini file, you can actually adjust this.

#set max post size php_value post_max_size 20M 

I have never adjusted this setting (since I don't need to), but there are many people who have with success.

Sign up to request clarification or add additional context in comments.

1 Comment

+1 thanks for the confirmation; I could not find any limit either. the php.ini is not relevant because I am not trying to limit it (and also I am not using PHP). I just want to be sure that users will be able to copy/paste and upload large amounts of text (instead of having to manage files) before I implement this solution.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.