Difference in GET and FORM method in posting data

We can send data to the data processing page by both the GET and POST methods of a form. Both methods are used in form data handling where each one has some difference on the way they work. We will discuss some of the differences.

As you have seen there is a character restriction of 255 in the URL. This is mostly the old browsers restriction and new ones can handle more than that. But we can't be sure that all our visitors are using new browsers. So when we show a text area or a text box asking users to enter some data, then there will be a problem if more data is entered. This restriction is not there in POST method.

In GET method data gets transferred to the processing page in name value pairs through URL, so it is exposed and can be easily traced by visiting history pages of the browser. So any login details with password should never be posted by using GET method.

As the data transfers through address bar ( URL ) there are some restrictions in using space, some characters like ampersand ( & ) etc in the GET method of posting data. We have to take special care for encoding ( while sending ) and decoding ( while receiving ) data if such special characters are present.

Difference between GET and POST
Browser HistoryData remain in Browser HistoryData Not available in Browser History
BookmarkURL with Data can be bookmarkedNo data is available in URL to bookmark the page
Data Length RestictionThe restriction (of URL ) is applicable No Restriction
cachedCan be cached No meaningful caching
Sensitive DataData like password , pin etc are exposed through URL so they should not be passed using GET methodBetter than GET method as data is not exposed through URL

Advantage of using GET method

one can store the name value pairs as bookmark and directly use them by bypassing the form.
It is easier to pass the id of a record like product id or student id through query string and get the relevant details.

Number of User Comments : 21




Really its a wonderful explanation ... thank you...;)


simple and understandable for a novice like me :), great mini article. Keep it up, Thanks.
reema sharma


wow!!i knew the difference but wanted to be sure..really all my doubts are gone..very detailed explanation...thank u.
Akhil Jain


It is really very good explanation, in HCL interview, interviewer asked me this question & that time I was not sure but after reading it I am confident that next time will not confuse with Get & Post. Thanks once again
Pawan Kaushal


It is a very simple and understandable article for any stage asp.net programmer.


good....nice explanation of GET method,but still no explanation of POST method in the above context. Kindly take care of this also. :)


very well explained. Thanks for the share. God Bless you!


Short &n Simple, yet effectively explained & easy to understand... Keep it up!!


to the point explanation , just what i was looking for .....!! :) gud work .
Amit sharma


really very simple explanation very simple word are use plz put some focus on PUT method
sunil kulkarni


it is simple and mindblowing explanation. its look like simple but i gathered lots of information from this differentiation.. Thank you
gurmeet kaur


thanks for explaning in so simple words and also do some focus on put method


explanation was good but for the post method should also b given.......
Ganesh Mandlik


Good Explanation, but its only about Get Method.


yeah..its a very good article..but not explain Post method to enough level....Post method is used for security purpose. end user are not see the processing data....


Good Explanation, and easy to understanding..!


nice explanation of GET method,but where is explanation of POST method........sir


i find this very short but informative.nice!thank you:)


No this was not helpfull for me. you should tell more about the pros and cons of POST and GET
anoop vaidya


Having 5+ yrs exp in IT, i must say...superb way to explain. I am not in web developement so its difficult for me to grasp all these stuffs :p
Sunil prajapati


Nice explanation about get and post method my all doubt have gone.

Post your comments , suggestion , error , requirements etc here .

We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2024 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer