Get and post differences are detailed

Source: Internet
Author: User

1,get is used to obtain data from the server, and Post is used to pass data to the server.

2. Get adds the data in the form as a key-value pair, followed by the URL that the action points to , and both use "? "Connect, and each variable uses a"&"connection;Post is the data in the form that is placed in the data body of the forms, in the same way that the variables and values are passed to the action the point URL.

3,Get is not safe, because in the transfer process, the data is placed in the requested URL , and now many existing servers, proxy servers or user agents will be the request URL is logged to the log file, Then place it somewhere so that there may be some privacy information that is visible to third parties. In addition, users can see the submitted data directly in the browser, and some system internal messages will be displayed in front of the user. all the actions of the Post are not visible to the user.

4,Get Transmission of small amount of data, mainly because of the URL length limit, and post can transfer a large amount of data, so in the upload file can only use Post(of course, there is a reason, Will be mentioned in the following).

5. Get restricts the value of the data set for form forms to be ASCII characters, while Post supports the entire ISO10646 character Set. The default is to encode with iso-8859-1

6,Get is The default method for Form.


Get and post differences are detailed

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.