stateless protocol and stateful protocol

后端 未结 7 935
离开以前
离开以前 2020-12-23 09:45

How to understand stateless protocol and stateful protocol? HTTP is a stateless protocol and FTP is a stateful protocol. For the web applications requiring a lot of interact

7条回答
  •  北海茫月
    2020-12-23 10:20

    HTTP is a stateless protocol. All the web-based applications are also stateless.

    When a request is send to the server, a connection is established between client and server. The server receives the request, processes the request and sends back the response and then, the connection will be closed.

    If another request will be sent, after that, it will be treated as a new request and a new connection will be established.

    In order to make HTTP stateful, we use session management techniques. So that, it uses the data coming from previous request while processing present request i.e, it uses the same connection for a series of client server interactions.

    The session management techniques are:

    1. hidden form field
    2. cookie
    3. session
    4. URL-rewriting

提交回复
热议问题