The get and post methods are different in the B/s application, the foreground and background data interaction is done through the form form in HTML.
The form provides two ways to transmit data--get and post. Although they are all ways of submitting data, there is a big difference in actual transmission,
And may have a serious impact on the data. Although to get the variable value conveniently, the Web container has blocked some of the differences,
But it will also be helpful to know the difference between the two in future programming. The Get and Post methods in form,
The Get and Post methods in the HTTP protocol are corresponding to each other during the data transfer process.
The main differences are as follows:
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 in the form of Variable=value, followed by the URL to which the action points, and both use "?". Connection
The "&" connection between the variables is used, and post is the data in the form that is placed in the data body, in the way that the variables and values correspond to each other.
Pass to the URL that the action points to.
3, get is not safe, because in the transfer process, the data is placed in the requested URL, and now many existing servers,
The proxy server or user agent logs the request URL to a log file and places it
This may cause some privacy information to be seen by third parties. In addition, users can see the submitted data directly on the browser,
Some system internal messages will be displayed in front of the user together. 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 the upload file can only use post (of course there is one reason that will be mentioned later).
5. Get restricts the value of the data set for form forms to be ASCII characters, while Post supports the entire ISO10646 character set.
6, get is the default method for form.
The data format for Get and POST is the same: the maximum byte limit for get support is the maximum byte limit of 2048 Bytes POST support is 2GB
Web Form form method= "get" method= "POST" difference