1. Get is used to obtain data from the server, while Post is used to transfer data to the server.
2. Get adds the data in the form to the URL pointed to by the action in the form of variable=value, and the two are connected using "?", and each variable is connected using "&"; Post is to add the data in the form to the URL pointed to by the action. The data is placed in the data body of the form and passed to the URL pointed to by the action according to the corresponding variables and values.
3. Get is unsafe because during the transmission process, the data is placed in the requested URL, and many existing servers, proxy servers or user agents will record the requested URL in a log file and then place it somewhere. place, so that some private information may be seen by third parties. In addition, users can also see the submitted data directly on the browser, and some internal system messages will be displayed in front of the user. All Post operations are invisible to users.
4. The amount of data transferred by Get is small, mainly because it is limited by the URL length; while Post can transfer a large amount of data, so only Post can be used to upload files.
5. Get limits the value of the data set in the Form form to ASCII characters; while Post supports the entire ISO10646 character set.
6. Get is the default method of Form.
7. Post requests are only suitable for transfer requests from page to page. If the address is entered directly from the address bar, the request cannot form a post request. In the case of post, the field of the previous page is used as The parameters are passed to the server. In the case of get, the parameters rely on the string after "?" in the address to form the parameters. The address specified by the src attribute in the frame is exactly the same as the address entered from the address bar, and the request issued is a get request.
To put it simply, the URL is generally passed through the get method. For example, you enter