CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    get and post method

    what is the difference between "get" and "post" method in a form of html?


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: get and post method

    with GET all the parameters in your form are concatenated to the end of the URL (ever seen thos "?name=...&lastname=...&city=.." stuff?). That's why the stuff passedto the server is visible to the user in the address bar.
    With POST the parameters are sent in a separate transaction.
    The amount of data you can send with GET is limited, not so with POST.
    POST is said to be slower as GET (because more transactions).


  3. #3
    Join Date
    Jul 1999
    Location
    India
    Posts
    51

    Re: get and post method

    When seen from the angle of the web server receiving the get or post request, the get is sent as a single environment string separated by ampersands: variable=value&nextvariable=anothervalue&... so on. Since this would be a single environment string, it is limited to a max of 128 chars (on some servers upto 255). Anything above the limit will "choke" the webserver's thread handling the connection from the remote machine.

    The post on the other hand generates separate environment variables for each item in the form. Assuming the "get" example above, you'll have environment strings like: variable=value and nextvariable=anothervalue which you'll read off in your CGI programs. There is no limit and there is no possibility of choking the webserver with too much data.


    Cheers!
    DP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured