In HTML, one can specify two different submission methods for a form. The method is specified inside a FORM element, using the METHOD attribute. The difference between METHOD="GET" (the default) and METHOD="POST" is primarily defined in terms of form data encoding. The official recommendations say that "GET" should be used if and only if the form processing is idempotent, which typically means a pure query form. Generally it is advisable to do so. There are, however, problems related to long URLs and non-ASCII character repertoires which can make it necessary to use "POST" even for idempotent processing.
For both METHOD="GET" and METHOD="POST", the processing of a user's submit request (such as clicking on a submit button) in a browser begins with a construction of the form data set, which is then encoded in a manner which depends on the ENCTYPE attribute. That attribute has two possible values mentioned in the specifications, but multipart/form-data is for "POST" submissions only, whereas application/x-www-form-urlenco ded (the default) can be used both for "POST" and for "GET".
The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI. If the Request-URI refers to a data-producing process, it is the produced data which shall be returned as the entity in the response and not the source text of the process, unless that text happens to be the output of the process.
POST is the preferred method for sending lengthy form data
The POST method is desiged to allow a uniform function to cover
* Annotation existing documents;
* Posting a message to a bulletin board topic, newsgroup, mailing list, or similar group of articles;
* Adding a file to a directory;
* Extending a document during authorship.
This method of HTTP creates a new object linked to and subordinate to the specified object. The content of the new object is enclosed as the body of the request.
Answered by
Om Prakash
, an ibibo Master,
at
1:52 PM on May 23, 2008