Noun Explanation:
http stateless: stateless means that the protocol has no memory capacity for transactional processing, and the server does not know what the client is. On the other hand, there is no connection between opening a Web page on a server and the pages you have previously opened on this server. If you want to implement a shopping cart, you need to record this information with the help of a cookie or session or server-side API (such as NSAPI and ISAPI). Submit this information to the server when you request the server to settle the page when you log on to a website, your login status is also "memorized" by a cookie or session, because the server does not know whether you are logged in or not
: The server does not have to allocate memory for each client connection to remember a large number of States, nor to clean up memory when the client loses connectivity, to handle the web business disadvantage more efficiently
: Each request of the client needs to carry the corresponding parameters, the server needs to process these parameters reference:/http en.wikipedia.org/wiki/stateless_protocol,http://www.webopedia.com/term/s/stateless.html
Keep-Alive: Refer to another article HTTP keep-alive detailed
easy to make mistakes:1, HTTP is a stateless connection-oriented protocol, stateless does not mean that HTTP cannot maintain TCP connections, It is not possible to use the UDP protocol for HTTP (no connection)2, from http/1.1 onwards, the default is to open the keep-alive, to maintain the connection characteristics, simply said, when a Web page opened, The TCP connection between the client and the server for transmitting HTTP data does not close, and if the client accesses the Web page on the server again, it will continue to use the established Connection 3, Keep-alive will not remain permanently connected, it has a hold time, This time can be set in different server software (such as Apache)
Connection:keep-alive