Methods GET vs. POST in HTML forms

Methods GET vs. POST in HTML forms.

Encoding form data into URL is needed by the GET method. The form data is to be appeared within the message body , by the POST method. By specification, GET is used basically for retrieving data where as POST is used for data storing, data updating, ordering a product or even e-mailing.

Methods GET vs. POST in HTML forms.

The GET method in the HTML forms passes the form values by setting the URL.

Example: If you type the word ‘Hello’ in Google Search, it sets the following URL
http://www.google.co.in/search?hl=en&q=hello&btnG=Search&meta=&aq=f&oq=

The POST method sends the data to the server without setting the URL:

Example:
-----------------------------97891525516423
Content-Disposition: form-data; name="username"

aaaa
-----------------------------97891525516423
Content-Disposition: form-data; name="password"

bbbbb12345
-----------------------------97891525516423
Content-Disposition: form-data; name="submit"

Submit
-----------------------------97891525516423--
What does the EnableViewStateMac setting in an aspx page do?
What does the EnableViewStateMac setting in an aspx page do? - ...
JavaScript - What are windows object and navigator object in JavaScript?
What are windows object and navigator object in JavaScript? - ....
How to detect the operating system on the client machine in JavaScript?
navigator.platform returns the platform on which the browser is running.
Post your comment