Share on Google+Share on Google+

samar
HTML form methods GET and POST
2 Answer(s)      6 years and 5 months ago
Posted in : HTML

What is the difference between the HTML form methods GET and POST?

Ads

View Answers

November 2, 2010 at 4:55 PM


Hi,

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.

There are some special cases where advantage of using GET method is , one can store the name value pairs as bookmark and directly use them by bypassing the form.

thanks.



November 2, 2010 at 4:55 PM


Hi,

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.

There are some special cases where advantage of using GET method is , one can store the name value pairs as bookmark and directly use them by bypassing the form.

thanks.










Related Tutorials/Questions & Answers:
HTML form methods GET and POST
HTML form methods GET and POST  What is the difference between the HTML form methods GET and POST
differences between GET and POST methods in form submit
differences between GET and POST methods in form submit  What are the differences between GET and POST methods in form submitting, give the case where we can use GET and we can use POST methods
Advertisements
GET and POST methods
GET and POST methods   What are the differences between GET and POST methods in form submitting, give the case where we can use GET and we can use POST methods
post get
post get  what is post and get
HTML Post Form
HTML Post Form      ... to send the form data in the form of message. The Post method in HTML is used... an example from HTML Post Form. In this Tutorial, the code explain you a post
get and post
get and post  what is php and get   PHP get and post method
POST or GET
POST or GET  hello, Which will execute faster on php POST or GET?   hii, The POST metod is much more faster then GET ..because in GET... to ULR that's why POST is faster then GET method
post get
post get  what is ajax
php form post to mysql
php form post to mysql  How to post data into mysql database from the PHP post data form
Difference between GET and POST
Difference between GET and POST   Difference between GET and POST ?   The difference between a GET and a POST is the way data.... The method used in the Servlet for processing either a GET or a POST is different
post ,get data in the database
post ,get data in the database  post ,get data in the database  Please visit the following links: PHP get post data PHP Tutorials
php $_GET and $_POST functions
php $_GET and $_POST functions:       PHP provides two special functions called $_GET & $_POST, this functions are used to get the values which are passed from a user-filled form, like user
POST AND GET METHOD - JSP-Servlet
POST AND GET METHOD  I AM LITTLE BIT CONFUSED IN GET() AND POST() METHODS. PLZ GIVE ME BREIF INTRODUCTION ABOUT THESE ??:)  Hi Friend...://www.roseindia.net/jsp/how-work-post.shtml http://www.roseindia.net/html/html-get
PHP HTML forms and Post Method Code
HTML Code <HTML><BODY> <FORM METHOD=?POST...PHP HTML forms and Post Method Code PHP html function With the given PHP HTML... to create html forms and display data using PHP Post Method in PHP
HTML Post Image
HTML Post Image       The Tutorial illustrates an example, how to post image in HTML... to get the picture ,that should be put on the html page. The code is saved
Post Method of the Form In JSP
Post Method of the Form In JSP   ... of the post method of the form in JSP. The HTTP post method sends data to the server from the HTML form elements. This method does not show the value of elements
how to post data in mysql php form
how to post data in mysql php form  how to post data in mysql php form
Java Servlet : Difference between GET and POST
Java Servlet : Difference between GET and POST In this section, we  will differentiate the GET and POST method of servlet. GET - It is HTTP method, asks to get thing at the requested URL. POST - It is HTTP method, asks
HTML Post Radio Button
HTML Post Radio Button       HTML Post attribute used in method, when a user is not able to see the data in the URL of browser. Post method is used for sending, updating
What is the difference between GET and POST method?
What is the difference between GET and POST method?  In PHP, both GET and POST method serves the same feature to get the data in variable. Still... it in detail with the case where we can use GET and POST method in PHP.   
HTTP GET or POST for my AJAX call
HTTP GET or POST for my AJAX call  hello, Should I use an HTTP GET or POST for my AJAX calls?   Hii, AJAX requests should use an HTTP GET request when retrieving data where the data will not change for a given
GET and POST Method of HTTP
it by using the post method.  There are few more rarely used http methods... GET  and POST Method of HTTP       GET The Get is one the simplest Http method. Its main job
HTML Form Validation example
HTML Form Validation example  Can anyone guide me how to validate the user name and password field in HTML using simple or JavaScript Validation. Thanks in advance!   <form method="post" onsubmit="return
HTML Form data into .CSV?
HTML Form data into .CSV?  how to store data from html form to csvfile in java
HTML form examples
HTML form examples  Hi, How to create a simple data entry form in HTML and use JavaScript to validate the same. Can anyone share html form examples code? Thanks   Hi, Please see the HTML form example page. Thanks
Registration Form in HTML
Registration Form in HTML  User Registration Form in HTML - i wanted to design a user registration form in HTML. So, Can anyone please guide me or give me a peace of code to design a user registration form in HTML. Thanks
web form(html) with jdbc
web form(html) with jdbc  need a example coding to develop a web form of data with jdbc   Hi Friend, Try the following code: 1)form.html: <html> <form method="post" action="http://localhost:8080/examples/jsp
HTML to php form
HTML to php form  Hi, How I can submit the HTML form data to PHP Script? Give me example code. Thanks   Hi, Please see the following tutorials: PHP Form PHP email form Thanks
HTML get Method
HTML get Method       The HTML get Method is used to submit the data of the page as part... helps you to understand an example from HTML get Method. In this Tutorial, we
post
post method in PHP  Write an example of the post method in PHP to send the data to another page or simply update the database.   in post values in the url will be hidden   in post   post
Tutorials   
Java Spring Hibernate Struts Training How to display button as a link in vaadin? hi change navbar dropdown color in bootstrap How to remove the background color of bootstrap menu bar? How to change color of opened Bootstrap drop down toggle? Setting bootstrap container background color Help school all activities and admision process.. add one row after another date make a webpage HTMl HTMl Source code how to apply globalisation to a world wide asp.net application how to print HTML using javascript or Jquery How to recover from google panda update? How to survive google panda 4.0 update How to find if you have been hit by Panda 4.0 Design a web page using XHTML and JavaScript that does the followings: ffmpeg converting file mp4 to mov JavaScript How to Disable Catch-all Emails on CPanel z-index always on top What is Web hosting Database and HTML web development trainee Uploading files Image Gallery Image Gallery dropdown How to redirect from a HTML page? Easiest method for expiring the css and js headers HTML WITH AJAX VB 6 Read Web Page Header string palindrom using vbscript? html button How to add mod_deflate to apache without recompiling How to use place hoder in IE(version : 8) Html Software Question div align left css Fetching data from excel file on other website and display in interactive graph form where do I find the fix for tree view catalog not expanding and collapsing correctly for roseindia shopping cart 1.1 pass to next page to enter into a particular page only if the username,password and listbox value mtches hi Cricket stadium ticket booking design Need some help creating an order form. HTML div tag HTML div tag

Ads

 
Advertisement null

Ads