"Illustrated HTTP" Chapter 9 Reading Notes

  Chapter 9: HTTP-Based Function Append Protocol

1. The bottleneck of the HTTP protocol :

  ①Only one request can be sent on a connection.

  ② The request can only be started from the client, and the client cannot accept instructions other than the response.

  ③ The header of the request/response is sent without compression . The more header information, the greater the delay.

④ Sending the same header to  each other every time results in a waste of resources.

  ⑤The compression format can be chosen arbitrarily, without forced compression.

2. Ajax solution: only a part of the page is updated each time, the amount of data transmitted in the response is therefore reduced (the entity body in the response message is reduced), and the speed is improved a little.

3. Comet's solution: a function of delaying response . Usually, the server will return a response immediately after receiving the request ; Comet will wait for the content of the server to be updated before returning a response. (This is to simulate a push function)

4. The disadvantage of Comet is that it consumes more resources due to suspending the response, that is, keeping the connection for a long time .

5. SPDY protocol: In 2010, Google released the SPDY protocol, which operates between the application layer and the transport layer in the form of a session layer , and then obtains the following functions:

  ① Multiplexing stream: It means that a connection can initiate multiple requests.

  ② Give request priority: It means to give priority to a certain part of the request.

  ③ Compress the header of the HTTP message.

  ④The server sends data directly without waiting for the client's request message.

  ⑤ The server can prompt the client what resources are needed.

6. WebSocket protocol (full-duplex communication protocol): the full- duplex communication standard between the browser and the server .

7. When using the WebSocket protocol, the initiator of the connection is still the client, and then the two parties establish a WebSocket communication connection, and then no matter the server or the client, either party can directly send messages to the other party .

8. WebDAV (World Wide Web-based Distributed Authoring and Version Control ): This is a file system that can directly create, copy, edit, delete and other operations on the content on the server . This file system also has a function: file The creator of can prevent other users from editing their content (lock feature).

9. WebDAV adds the following methods to HTTP/1.1 :

  ①PROPFIND: Get properties

  ②PROPPATCH: Modify properties

  ③MKCOL: Create a collection

  ④COPY: Copy resources and attributes

  ⑤MOVE: Move resources

  ⑥LOCK: Resource lock

  ⑦UNLOCK: Resource unlock

 The corresponding additional status codes are:

  ①102 Processing: status in processing

  ②207 Multi-Status: There are multiple states

  ③422 Unprocessible Entity: The format is correct, the content is wrong

  ④423 Locked: The resource is locked

  ⑤424 Failed Dependency: The processing of the request associated with a request failed, so the dependency is no longer maintained

  ⑥507 Insufficient Storage: Insufficient storage space

10. Use the PUT method and the DELETE method to create and delete files on the server.

11. The basic function of the firewall is to prohibit the data packets of non-specified protocols and port numbers from passing through.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324788633&siteId=291194637