As the word suggests Get method is used to get the data from somewhere, whereas, Post method is used to put data somewhere. Many people are confused about the usage of these 2 methods as a result of which they create a blunder. There are website designers who are not aware of the consequences of using the Get method instead of the Post method. Below is the difference between the two.
GET Method
In case of Get method, request parameters are added along with the request and then transmitted as a query to the server.
If you are using GET method, you are limited to a maximum of 256 characters in the URL, minus the number of characters in the actual path. Moreover the contents of data are visible in the URL.
GET is used for just retrieving the data.
A GET request is often cacheable, i.e the browser bookmarks the response returned from the request.
GET is typically used to access the static resources, such as HTML documents and images.
GET requests are inherently (according to HTTP spec) IDEMPOTENT. It means you can do same thing over and over again (like retrieving any picture file from server), with no un-wanted side-effects on the server.
The major objective of using GET request is that, the request does not changes anything on the server, however you can write a bad, non-idempotent doGet() method.
POST Method
In case of Post method, request parameters are encoded within the body and then transmitted along with the body of request.
POST method is not limited by the size of the URL for submitting name/value pairs. These pairs are transferred in the header and not in the URL, thus contents of data are NOT visible in the URL.
POST may involve anything like, saving or updating the data, or ordering the product, or sending e-mail.
A POST request can hardly be cacheable.
POST is typically used to transmit the information that is request-dependent, or when a large amount of complex information must be sent to the server.
POST request are inherently NON-IDEMPOTENT, it is frequently used, when processing of the request changes the state of the server, such as storing data in database.
The major objective of POST request is that request changes something on server, for example the data submitted in the body of POST request might be destined for a transaction that cannot be reversed, however you have to design your application in such a way, that if the client sends the same request TWICE by mistake, your code should handle it
Published by Harsh Gupta - Tech Writer
I am a part time freelancer and writing is my hobby Some of my websites: http://www.GenericArticles.com http://www.JailBreakingiPhone.com View profile
5 Simple Methods of Still Meditation and Their BenefitsPracticing one or more of these still meditation methods on a regular basis will enhance your sense of spirituality, relax you, improve your concentration and spark your creativity
Top Birth Control MethodsChoosing the birth control method that is right for you takes some research. This article will discuss the top birth control methods available.- Three FREE Natural Birth Control Methods: Information that Males and Females Shoul...Couples who engage in sexual activity must realize that doing so can bring about a pregnancy. There are natural alternatives to hormonal or barrier methods. Three natural methods are: The Billings Ovulation, The Sympt...
- A Survey of Methods to Increase Memory and Attention in StudentsThis paper discusses a survey of methods and strategies to increase student memory and attention.
How to Find Great College Scholarship Web SitesAs college tuition continues to skyrocket and loans become tougher to get (thanks Wall Street meltdown), you need all the scholarships you can get. Lucky for you, there's schola...
- How to Send and Receive HTTP Web Request & Response in Vb .Net?
- Making Ajax Request
- Making Ajax Request
- A Post Office Autism Tantrum
- How to Upload and Post an Image Online
- Make Money with Your Blog - Five Easy Methods
- Dating Methods in Archaeology: Must Know for Geology Students!
- GET is used for just retrieving the data.
- A GET request is often cacheable, i.e the browser bookmarks the response returned from the request.
- A POST request can hardly be cacheable.
