HTTP is statel-less,so what does it mean by keep-alive?

前端 未结 5 1955
慢半拍i
慢半拍i 2021-02-07 10:49
Keep-Alive: 300
Proxy-Connection: keep-alive

As we know HTTP connection is closed when the request gets responded,so what does it mean by keep-al

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-07 11:44

    The protocol is indeed stateless, but keep-alive indicates that the connection should be kept open between the client and server.

    Opening a TCP connection is a relatively heavyweight operation, and keeping that connection open avoids the setup and teardown cost associated with opening a new connection.

提交回复
热议问题