[Home]Difference between POST and GET

HomePage | RecentChanges | Preferences | Newbie Help

Post and Get are the two main methods used in passing requests from the browser to the web server.

Normal links are GET methods by default, meaning that all the information that needs to be sent about the resource is sent via the URL (and appears in the location bar of your browser). Any additional values - like field values are sent as name/value pairs appended to the end of the URL. (The Google search engine is a good example of a get method sending name value pairs: http://www.google.com/search?q=HTML+FAQ this gives us a search result of pages matching the search request "HTML FAQ").

The post method on the other hand has only the URL of the page requested in the location bar, but it sends all other information - like field values, in the body of the [http request]?.

Technically, the main rule of thumb between GET's and POST's is that if you submit the same GET request multiple times, then you will get the same results back (this is called an idempotent request). With a post, the results can be different each time.

Both POST and GET can be used in form submission, but which should you use? Here are a few rules of thumb to help you along:


HomePage | RecentChanges | Preferences | Newbie Help
This page is read-only | View other revisions
Last edited March 3, 2001 4:03 am (diff)
Search:

This FAQ is happily hosted by Betadome Digital Media