Search This Blog

Tuesday, September 21, 2010

What is the difference between get and post method in HTTP?

GET Method: 

1. All the name value pairs are submitted as a query string in URL.
2. Length of the string is restricted.
3 .It's not secured as it is visible in plain text format in the Location bar of the web browser.
4. If get method is used and if the page is refreshed it would not prompt before the request is submitted again.
5. If the response of the page is always same for the posted query then use GET example database searches
6. GET" is basically for just getting (retrieving) data

POST Method: 

1. All the name value pairs are submitted in the Message Body of the request.
2. Length of the string (amount of data submitted) is not restricted.
3. Post Method is secured because Name-Value pairs cannot be seen in location bar of the web browser.
4. If post method is used and if the page is refreshed it would prompt before the request is resubmitted.
5. If the service associated with the processing of a form has side effects (for example, modification of a database or subscription to a service), the method should be POST.
6. "POST" may involve anything, like storing or updating data, or ordering a product, or sending E-mail.

No comments:

Post a Comment