HTTP status code of 200 and 304

Original link: https://www.cnblogs.com/daxueba-ITdaren/p/6484443.html

HTTP status code (HTTP Status Code) is a digitally encoded showing three web server response status. By these figures, the expression status may be simplified. There are ten status code, wherein the first digit is 1-5. The five figures, the status code can be divided into five categories. 1XX indicates that the request is being processed; 2XX indicates that the request has been successfully processed; 3XX redirect representation; 4xx error indicates that the request; 5xx means that the server error.

In the process of sniffer packet capture, a common state it has 200 and 304. The two status codes are related to the ability to obtain important information. When the user first requests the server resources, the server returns a resource successfully, the status code of which is 200. Therefore, the status code 200 for the data packet comprises data of the user is often acquired from the server.

Each resource request is completed normally be cached at the client, and records the time and resources of the effective modification time. When a client requests a resource again, the client first looks up the resource from the cache. If the resource is present, and valid, the server is not requested, it will not generate a corresponding request packet.

If it is not valid, the client requests the server to reacquire. Server will determine the modification time, if not modified, will return status code 304, telling the client that the resource is still valid, the client will directly use the cache resources. For the 304 response, the permeate can analyze the corresponding request packet, acquiring resource path. If the resources do not restrict access, you can get a direct request. Otherwise, you need to Cookie hijacking, is acquired.

 

Guess you like

Origin blog.csdn.net/weixin_41282726/article/details/100529059