GET POST distinction

GET fallback when the browser is the data is unchanged, while the POST will submit the request again

This contributed to, when you move from page to page a b, and back again, post twice and get sent only to send a request

GET URL address can be generated bookmarked, but not POST

GET requests are active cache browser's cache, and POST will not, unless manually set

GET request can only be url encoded, and support multiple encoding Post

GET request parameters passed in the URL length is limited, and no POST

For the data type of the parameter, GET accepts only ASCII characters, post no limit

GET request parameters are intact in the browser history, and the POST parameters are not retained

GET more secure than POST, because the parameters directly exposed on the URL, it can not be used to transmit sensitive information

GET parameters passed via the URL, POST Request body placed in

 

Let's ripped coat both, candor it (okay, is the essential difference)


GET request the parameter contained in the URL, the URL request information on the back, the POST request body parameters passed by request, the request information is placed in the packet body.
 
get security is very low, get designed to transmit data, generally you can see in the address bar inside, post high security, post transfer data comparison privacy, so you do not see in the address bar, if not encrypted, they have the level of security is the same, a casual listener can listen to all the data. This also resulted in general we are using to get data get, the data is transmitted using post


GET requests can be cached, GET requests will be saved in the history of the browser, so GET request URL can be saved as a browser bookmark, post the request does not have these features.

GET and POST are two ways http protocol, it is based on tcp / ip's. In distinguishing between get with the post. Mainly in order to facilitate the distinction.
Because the function more. Always distinguish thing. Browsers need to be treated differently. Otherwise, if unified treatment will inevitably waste some resources ah. And more time-consuming and the like. For example, get have length restrictions. This is a limitation of the browser.
So, it is the TCP link on GET and POST essentially no difference. However, due to the provisions of HTTP and the browser / server, causing them to reflect some differences in the application process
 
Generating a TCP packet GET, POST generates two TCP packets.
For the get request mode, the browser will send http header data and go out, in response to the server 200 (return data).
For the post, the browser transmits the first header, the server response 100 continue, the browser transmits data, the server 200 returns the response data.
According to the research, in the network environment is good, send a packet time difference between time and send the two packets basically ignored. And in the case of poor network environment, TCP packets over the two packet integrity verification, there is great advantage.
Not all browsers will send two packets, Firefox is sent only once during POST.
 

 

Guess you like

Origin www.cnblogs.com/skydragonli/p/11370334.html