answersLogoWhite

0


Best Answer

As per functionality both GET and POST methods were same.Difference is GET method will be showing the information information to the users.But in the case of POST method information will not be shown to the user.

The data passed using the GET method would be visible to the user of the website in the browser address bar but when we pass the information using the POST method the data is not visible to the user directly.

Also in GET method characters were restricted only to 256 characters.But in the case of POST method characters were not restricted.

Get method will be visible to the user as it sended appended to the URL, put Post will not be visible as it is sent encapsulated within the HTTP request body.

About the data type that can be send, with Get method you can only use text as it sent as a string appended with the URL, but with post is can text or binary.

About form default, Get is the defualt method for any form, if you need to use the post method, you have to change the value of the attribute "method" to be Post.

Get method has maximum length restricted to 256 characters as it is sent appended with the URL, but the Post method hasn't.

Get method has limitataion in the size of data tranamitted, but post method hasn't.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

8y ago

GET Method:

  1. All the name value pairs are submitted as a query string in URL.
  2. It's not secured as it is visible in plain text format in the Location bar of the web browser.
  3. 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 data if such special characters are present.
  4. Length of the string is restricted.
  5. If method is not mentioned in the Form tag, this is the default method used.
  6. If get method is used and if the page is refreshed it would not prompt before the request is submitted again.
  7. One can store the name value pairs as bookmark and directly be used while sharing with others - example search results.
  8. Data is always submitted in the form of text
  9. If the response of the page is always same for the posted query then use GET example database searches
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. Data is submitted in the form as specified in enctype attribute of form tag and thus files can be used in FileUpload input box.
POST is better because GET puts the code in the browser so people can view the information (eg.hackers) however with POST you can't favorite the page but you can with GET

GET and POST methods are both ways of transporting variables (and their values) from one page to another. However, they transport the variable names and values in different ways. GET uses the URL to transfer variables. Web pages can pick up the URL address and detach the variables usable to the scripting language used in the page. A user can change the variable names and values of a URL with GET-type variables. This introduces security risks, as it is an open way to attack a website. All variables that could possibly be input by a user should always be checked. GET values must be under 255 characters, otherwise some older browsers will not transfer values properly. Today's browsers propagate values just fine with larger character limits, such as 4,000 - but caution should be taken. POST transfers variables from one page to the next - broadly speaking - silently. No users can edit these variables without simulating a POST transfer to the page - which is a more difficult route for site attackers to make. These variables should still always be checked. POST values can be of infinite length.

This answer is:
User Avatar

User Avatar

Wiki User

15y ago

Get and Post are two different ways of passing data from your web application screen and the servlet.

When you submit your web page (form) the data would reach the servlet in either of the two ways Get and Post. The methods doGet() and doPost() are servlet specific action methods that can handle the submit actions. If you have specified your form submission type as Get then the doGet() would be invoked and if you have specified as Post the doPost() would be invoked.

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

1) HTTP GET: In HTTP GET method data passed through URL querystring using name value pair. It's simpler and you can troubleshoot any problems simply by looking at the address bar in your browser because all values passed are displayed there. This is also the primary weakness of this method.

2) HTTP POST: In HTTP POST request data are embeded in a HTTP HEADER. So data are NOT visible to end user while you can see the data passed in HTTP GET method. So if you want to pass sensitive information/data, you should have to use HTTP POST request. Another advantage is that you can send larger amounts of information compare to HTTP GET method.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

Normally in javascript you get dynamic data from servers using a GET method and you send dynamic data to the servers using POST method. Ofcourse do not assume that they cannot be interchanged cause essentially both send some form of data to the servers.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between get and post method in HTTP?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is difference between GET and POST in servlets in java?

The difference between a GET and a POST is the way data is transferred to a servlet. With a GET, the URL will show each name/value pair on the query string in the URL. For example, if you had a form with a field named 'foo,' and when submitted had a value of 'bar,' the URL might be something like this: http://www.example.com/servlet?foo=bar With a POST, this information is not visible in the URL. Instead, it is transferred in the HTTP headers. As far as the actual servlet is concerned, there is not a great deal of difference when it comes to getting the parameters. Whether you use a GET or a POST, you still use request.getParameter("foo"); to get the value. The method used in the Servlet for processing either a GET or a POST is different too. If you use a GET, the method that is called is doGet(HttpServletRequest, HttpServletResponse). The doGet method is also called if there is no GET or POST data. If you use a POST, the method called is doPost(HttpServletRequest, HttpServletResponse).


Is http post method equal to https method?

No, they are not equal in any way. HTTPS is more secure than the post method.


What is the difference between registered post and speed post?

Speed post is simply a faster method of delivery. Registered post has to be signed for on receipt to prove to the sender that the letter/parcel has been delivered.


What is difference between graduation and post graduation?

what is difference between graduate and post gruduate


Which HTTP methods data is not cached in the browsers URL history?

"post" method


What is the difference between post encephalitis and post meningitis?

Aurore


Code for post and get in HTML form?

// getFirst name: Last name: Click the "Submit" button and the input will be sent to a page on the server called "form_action.asp".//postThe form-data can be sent as URL variables (with method="get") or as HTTP post (with method="post").Notes on the "get" method:This method appends the form-data to the URL in name/value pairsThis method is useful for form submissions where a user want to bookmark the resultThere is a limit to how much data you can place in a URL (varies between browsers), therefore, you cannot be sure that all of the form-data will be correctly transferredNever use the "get" method to pass sensitive information! (password or other sensitive information will be visible in the browser's address bar)Notes on the "post" method:This method sends the form-data as an HTTP post transactionForm submissions with the "post" method cannot be bookmarkedThe "post" method is more robust and secure than "get", and "post" does not have size limitations


Difference between pre-tensioned and post-tensioned?

what a wicked page, really helpfull Difference between pre-tensioned and post-tensioned?


What is the difference between POST and REQUEST methods in PHP?

The $_POST array contains only variables supplied by a form that used the POST method, while the $_REQUEST array combines the $_POST, $_GET and $COOKIE arrays.


Pre indexing post indexing difference between?

what are the differents between preindexing and post indexing?


Difference between modernism and post modernism?

The difference between modernism and post modernism are the highlights and approaches towards life. It also differs in the ways of thinking that led to these movements.


What is the difference between request query string and requestform collection?

The request query string contains data sent to the server as part of the URL, typically accessed using the Request.QueryString collection in ASP.NET. Meanwhile, the request form collection contains data sent to the server in the body of the HTTP request, such as form data from a POST request, and is accessed using the Request.Form collection in ASP.NET.