Is there a size limit of form data that can be submitted?

Discussion in 'HTML' started by Guy, Dec 5, 2003.

  1. Guy

    Guy Guest

    If a form has a TEXTAREA and a SUBMIT button, how much text can a user type
    in the textarea? What I mean is, what is the limit of characters that can
    be submitted from the HTML form?

    I can't imagine 2000 characters being sent in a URL so I suppose I would use
    POST instead of GET, but does anyone know if and what the limit is?

    Guy
     
    Guy, Dec 5, 2003
    #1
    1. Advertising

  2. Guy

    brucie Guest

    in post <news:MQ_zb.5018$>
    Guy said:

    > If a form has a TEXTAREA and a SUBMIT button, how much text can a user type
    > in the textarea?


    it depends on the user agent.

    > What I mean is, what is the limit of characters that can
    > be submitted from the HTML form?


    pre HTML4 attribute values were limited to 1024 chars. HTML4 changed to
    64k chars which is SGMLs max value however:

    "These are the largest values permitted in the declaration. Avoid fixed
    limits in actual implementations of HTML UA's"
    http://www.w3.org/TR/html4/sgml/sgmldecl.html

    --
    brucie
    05/December/2003 10:41:52 pm kilo
     
    brucie, Dec 5, 2003
    #2
    1. Advertising

  3. In article <bqpv26$241ln8$-berlin.de>, brucie01
    @bruciesusenetshit.info says...
    > in post <news:MQ_zb.5018$>
    > Guy said:
    >
    > > If a form has a TEXTAREA and a SUBMIT button, how much text can a user type
    > > in the textarea?

    >
    > it depends on the user agent.
    >
    > > What I mean is, what is the limit of characters that can
    > > be submitted from the HTML form?

    >
    > pre HTML4 attribute values were limited to 1024 chars. HTML4 changed to
    > 64k chars which is SGMLs max value however:


    Was that 1024 limit on GET rather than POST, though? IIRC the limit was
    quite ambiguous, depending on the UA, as you said, though Netscape
    documentation mentioned 2,048 some time ago.

    --
    Hywel I do not eat quiche
    http://hyweljenkins.co.uk/
    http://hyweljenkins.co.uk/mfaq.php
     
    Hywel Jenkins, Dec 5, 2003
    #3
  4. Hywel Jenkins wrote:

    > In article <bqpv26$241ln8$-berlin.de>, brucie01
    > @bruciesusenetshit.info says...
    >
    >>> What I mean is, what is the limit of characters that can
    >>> be submitted from the HTML form?

    >>
    >> pre HTML4 attribute values were limited to 1024 chars. HTML4 changed to
    >> 64k chars which is SGMLs max value however:

    >
    > Was that 1024 limit on GET rather than POST, though?


    Neither. It was a limit on the input control itself.

    URLs do not have a limited length, so in particular, there is no limit to
    the size of a GET request.

    Certainly any sized file can be transmitted in an HTTP POST request (think
    file upload forms), so the size of a POST request must also be unlimited.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
     
    Toby A Inkster, Dec 5, 2003
    #4
  5. Guy

    brucie Guest

    in post <news:>
    Hywel Jenkins said:

    >> pre HTML4 attribute values were limited to 1024 chars. HTML4 changed to
    >> 64k chars which is SGMLs max value however:


    > Was that 1024 limit on GET rather than POST, though?


    theres no distinction. attribute values are just 64k

    HTTP1.1 says it puts no limit on the length of GET and servers should be
    able to handle it but if they cant return a 414.

    IE<3 url limit is 1k, IE3+ 2k. opera<3.2 is 256. opera 3.5+ is 1k. (may
    be more now but i couldn't find it). couldn't find anything for NS/moz

    --
    brucie
    06/December/2003 08:19:13 am kilo
     
    brucie, Dec 5, 2003
    #5
  6. Toby A Inkster wrote:
    > URLs do not have a limited length, so in particular, there is no limit to
    > the size of a GET request.


    Most servers do put a limit on GET length, though.
     
    Leif K-Brooks, Dec 6, 2003
    #6
  7. brucie <> wrote:

    >>> pre HTML4 attribute values were limited to 1024 chars. HTML4
    >>> changed to 64k chars which is SGMLs max value however:

    >
    >> Was that 1024 limit on GET rather than POST, though?

    >
    > theres no distinction. attribute values are just 64k


    But attribute values are quite distinct from form field values.
    Attribute values are something that resides in an HTML document,
    whereas form field values are (normally) entered by the user.

    In practical terms, it's best to stay well below 1024 characters,
    though the actual limitations are usually somewhere around 2000.
    More info: http://www.cs.tut.fi/~jkorpela/forms/methods.html#exc

    (That means keeping URL length below 1024. And since you cannot know
    the size of actual data submitted, it's safest you use method="POST"
    for anything that isn't something like a search form submission with a
    relatively small set of fields.)

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
     
    Jukka K. Korpela, Dec 6, 2003
    #7
  8. Guy

    brucie Guest

    in post <news:Xns94491B4672D23jkorpelacstutfi@193.229.0.31>
    Jukka K. Korpela said:

    >> theres no distinction. attribute values are just 64k


    > But attribute values are quite distinct from form field values.
    > Attribute values are something that resides in an HTML document,
    > whereas form field values are (normally) entered by the user.


    the way i was looking at it was that the text entered still ends up as
    an attribute value of the element.

    --
    brucie
    06/December/2003 10:48:26 am kilo
     
    brucie, Dec 6, 2003
    #8
  9. brucie <> wrote:

    > the way i was looking at it was that the text entered still ends up
    > as an attribute value of the element.


    Nope. If I have, say, <input type="text" name="foo"> and you type "bar"
    into the text input box corresponding to this element, as created by a
    browser, then "bar" does not become any attribute value. If I had
    <input type="text" name="foo" value="brucie">, the situation would be
    the same; the value of the form field "foo" would be "bar", and
    "foo=bar" would be inserted by the browser into the form data set, and
    hence into the URL (when method="GET" is used), but this would not
    change the element's attributes the least. (The value attribute would
    still be _relevant_ too, if the form contains a reset button, which
    shouldn't normally be there, but I digress.)

    The input data, which becomes the value of a field, might be
    accessible, via a Document Object Model, as a property of an element.
    If it's called attribute in that context, that's misleading, but still
    does not change the HTML element's attributes the least.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
     
    Jukka K. Korpela, Dec 6, 2003
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eric Shin

    Form submitted

    Eric Shin, Jan 12, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    482
    Martha[MSFT]
    Jan 12, 2004
  2. Ben Jessel
    Replies:
    2
    Views:
    6,210
    Sudsy
    Nov 26, 2003
  3. Replies:
    1
    Views:
    1,097
    Victor Bazarov
    Jun 28, 2005
  4. zigzagdna
    Replies:
    22
    Views:
    1,674
    Gene Wirchenko
    Nov 9, 2011
  5. Ketchup
    Replies:
    1
    Views:
    258
    Jan Tielens
    May 25, 2004
Loading...

Share This Page