Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how many characters are possible in an input field in html?

Tags:

html

input

What is the "natural" number of allowed characters in an input field in html?

thanks a lot

addition due to the comments

i don't need to send it to the server via post or get. i am going to parse the string via JS.

So if the input is unlimited like @sAc says brings me to two further questions:

  1. What is the longest String JS can handle?
  2. what is the lowest amount of allowed characters for an input in common browsers?(which would be my limit than)
like image 737
helle Avatar asked Jun 24 '10 07:06

helle


1 Answers

Firefox 3.6.6 on my 32 bit Win 7 machine becomes slow after 1,000,000 characters and totally freezes after 4,000,000.

Chrome crashes somewhere after 8,000,000.

IE8 crashes somewhere after 8,000,000.

Safari crashes somewhere after 2,000,000.

In my testing Chrome/IE8/Safari don't slow down as the size goes up the way Firefox does.

like image 172
Samuel Neff Avatar answered Sep 23 '22 00:09

Samuel Neff