Thursday, September 21, 2006

What are the differences between Get and post methods in form submitting?

The HTML specifications technically defines the difference between "GET" and "POST" methods, so that former means that form data is to be encoded (by a browser) into a URL while the latter means that the form data is to appear within a message body. The specifications also give the usage recommendation that the "GET" method should be used when the form processing is "idempotent" (i.e. it has no lasting observable effect on the state of the world), then the form method should be GET. Many database searches have no visible side-effects and make ideal applications of query forms, and in those cases only. As a simplification, we might say that "GET" is basically for just getting (retrieving) data whereas "POST" may involve anything, like storing or updating data, or ordering a product, or sending E-mail.

If the service associated with the processing of a form has side effects (i.e. modification of a database or subscription to a service), the method should be POST.

Maximum URL length in GET is 2083 characters in IE.

1 comment:

गुरु said...

Great Help dude!


Sarjya.