what is the difference between GET and POST methods for submitting a form ?

When you use method=”get” to submit the form,

  1. The form contents are transmitted / submitted in the URL itself, in the format: URL?name=value&name=value.
  2. If the form values contains non-ASCII characters or exceeds 100 characters you MUST use method=”post“.
  3. The “get” method is usually used when the form is deemed idempotent (i.e., causes no side-effects). For example, many database searches have no visible side-effects and make ideal applications for the “get” method. Even google searches are like this.
  4. http://www.google.com/search?q=panicroom.me

When you use method=”post” to submit the form, then

  1. The form contents are transmitted / submitted in the body of the request.
  2. Most browsers are unable to bookmark post requests since nothing is sent in the URL itself.
  3. The “post” method should be used if the service associated with the processing of a form causes side effects (for example, if the form modifies a database or subscription to a service).

, , {1}

One Response on “what is the difference between GET and POST methods for submitting a form ?”

Trackbacks/Pingbacks

  1. [...] what is the difference between GET and POST methods for submitting a form ?(panicroom.me) [...]

Leave a Reply