Better than I did before. Get vs POST

Source: Internet
Author: User

The size of the data in the 1,get is limited: we all know that many older browsers limit the number of URLs to 255; Although the current version of the browser has not been the limit of the pain, but we can not guarantee that all the users to visit the site is the use of new browsers. So when we need users to fill out some information in the Web page, there is definitely something wrong with the Get method. Without this restriction in the reverse post method, we can transfer data of any size.

The data type in 2,get is not flexible: Because get uses a URL to transmit data, such as a space character and a character like & are not easy to transmit. We can use the pre-send code, and accept the decoding method to solve.

3, security : In Get, the parameter is the name-value pair of the query string hook in the URL suffix to transmit, so this is very easy to be queried in the browser history. All the data is also submitted in text, so we know that the password for the login operation is definitely not to be submitted using the Get method.

On the contrary, the post method is much more secure. All name-value pairs are transmitted as message bodies in the form of HTTP request.

4, speed : Obviously get faster than post.

5, Bookmark: In fact, there are a few situations where get better, for example, you can bookmark the name value to the parameters of the way to store and directly in the child's form to use. But it can't be done on post.

6, uploading a file as a form can only be done using Post, and get is almost impossible.

7, data may be lost when the server submits data in the Get mode. But it's not for post.

8,get uses the Stack method to transfer form variables, and post uses the Heap method to transfer form variables.

9,get can transmit up to 18 parameters at a maximum and post without this limit.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.