Well, everybody knows the difference between get and post, I won't say it, just say two points, as follows:
The 1.HTTP protocol is an application of TCP/IP, so get and post are also TCP connections, so get and post actually have no limit on the length of the URL and the size of the content sent (the URL length and the size limit of the sending content that we usually see are the limits from the individual browsers, Rather than the limitations of the HTTP protocol itself)
2.GET generates a TCP packet, and the post generates two TCP packets.
Get request, the header and data will be sent to the server together;
For post, the browser first sends the header, the server responds to the Continue, the browser sends the data, and the server responds with a $ OK (return data).
Because post takes two steps, it consumes a bit more time and looks like get is more efficient than post. So the Yahoo team recommends using get to replace post to optimize site performance. But this is a pit. Jumping in requires caution. Why.
1. Both get and post have their own semantics and cannot be mixed.
2. According to research, in a good network environment, the time to send a packet and two times the time difference between packets can be ignored. In the case of poor network environment, two packets TCP has a great advantage in verifying the integrity of packets.
3. Not all browsers will send two packets in post, and Firefox will send them only once.
After the interview, meet the interviewer to ask you, you can not do this, haha