A Web site may receive millions of user requests per day, but this also creates some performance drawbacks, for example, a Web page file containing many images does not contain the actual image data content, but only indicates the URL of the image. When a Web browser accesses this Web page file, the browser first issues a request for that Web page file, and when the browser resolves the HTML content in the Web document returned by the website, the browser will find the image tag, depending on the The URL address specified by the SRC attribute in the label again sends a request to the server to download the image data, as shown in 3.3. Figure 3.3 Obviously, the entire process of accessing a Web page file containing many images consists of multiple requests and responses, each of which requires a separate connection, each of which transmits only one document and image, and the last and the next request are completely detached. Even though the image files are small, it is a relatively time-consuming process to establish and close each connection between the client and server, and it can severely affect the performance of the client and server. When a Web page file contains applet,javascript files, CSS files and other content, it will also appear similar to the above situation. To overcome this flaw in HTTP 1.0, multiple requests and responses for a Web page file with many images can be transferred in a single connection, but requests and responses for each individual Web file still need to use their own connection. The information exchange process between client and server based on the HTTP 1.1 protocol, as shown in 3.4. As shown in Figure 3.4, HTTP 1.1 overcomes the performance issues of HTTP 1.0, based on the advantages of HTTP 1.0. Not only that, HTTP 1.1 also improves and expands the functionality of HTTP 1.0 by adding more request headers and response headers. For example, because Web browsers cannot use host header names to explicitly indicate which Web site to access on the server, you cannot use a Web server to configure multiple virtual Web sites on the same IP address and port number. A persistent connection to HTTP 1.1 also requires the addition of a new request header to help implement, for example, when the value of the connection request header is keep-alive, the client notifies the server to remain connected after returning the request result, and when the value of the connection request header is close, The client notifies the server to close the connection after returning the result of the request: "in-depth experience java web Development Insider-Core Foundation" HTTP agreement old Standard is http/1.0, the most common standard is http/1.1. http/1.1 is in the http/1.0 baseUpgrade, add some features, fully compatible with http/1.0. http/1.0 does not support file breakpoint continuation, the majority of the current Web server has adopted the http/1.1. Range:bytes is a new addition to http/1.1, http/1.0 each transfer file starts at the beginning of the file header, which is 0 bytes. RANGE:BYTES=XXXX indicates that the server is required to start the transmission from the file XXXX byte, which is what we call a continuation of the breakpoint! The original English version of RFC 1945-hypertext Transfer Protocol--http/1.0http://www.w3.org/protocols/rfc1945/rfc1945http://www.faqs.org /RFCS/RFC1945.HTMLRFC 2616-hypertext Transfer Protocol--http/1.1http://www.w3.org/protocols/rfc2616/rfc2616http:/ /www.w3.org/protocols/rfc2616/rfc2616.htmlhttp://www.faqs.org/rfcs/rfc2616.html (Proposed) HTTP-NG Working grouphttp://www.w3.org/protocols/http-ng/Next Generation Hypertext Transfer Protocol (HTTP-NG), in order to overcome the shortcomings of the current HTTP protocol, World Wide Web Consortium Start researching the next generation of HTTP protocols? Ttp-ng. It is divided into three levels: the application layer, the message layer, the transport layer. Existing applications on the Web will be converted to the http-ng platform, and the entire platform will be updated to Http-ng. RFC 1945-hypertext Transfer Protocol--http/1.0 Chinese version http://man.chinaunix.net/develop/rfc/RFC1945.txthttp:// Www.cnpaf.net/rfc/rfc1945.txtRFC 2616-hypertext Transfer Protocol--http/1.1 Chinese version 1.0 and 1.1, English key Differences Between http/1.0 and Http/1.1http://www.reseArch.att.com/%7ebala/papers/h0vh1.html Chinese Translation version did not see, have seen tell me:) attached: HTTP 1.1 status Code and its meaning status code status information meaning 100 continue The initial request has been accepted and the customer should continue to send the remainder of the request. (HTTP 1.1 new) 101 switching protocols server will convert the client's request to another protocol (HTTP 1.1 new) 200 ok Everything is OK, the answer document for Get and post requests is followed. The 201 created Server has created the document, and the location header gives its URL. 202 accepted has accepted the request, but the processing has not been completed. 203 non-authoritative information The document has returned normally, but some of the answer headers may be incorrect because a copy of the document is being used (HTTP 1.1 is new). 204 no content no new document, the browser should continue to display the original document. This status code is useful if the user refreshes the page on a regular basis and the servlet can determine that the user's document is new enough. 205 Reset content has no new content, but the browser should reset what it displays. Used to force the browser to clear the form input (HTTP 1.1 new). 206 Partial content Customer sends a GET request with a range header that the server has completed (HTTP 1.1 new). 300 multiple choices Customer requested documents can be found in multiple locations that have been listed in the returned document. If the server wants to make a preference, it should be indicated in the location answer header. 301 MoveD permanently the document requested by the customer elsewhere, the new URL is given in the location header, and the browser should automatically access the new URL. 302 found is similar to 301, but the new URL should be treated as a temporary replacement, not a permanent. Note that the corresponding status information in HTTP1.0 is "Moved temporatily". When the status code appears, the browser can automatically access the new URL, so it is a useful status code. Note that this status code can sometimes be used with 301 substitutions. For example, if the browser mistakenly requests Http://host/~user (the trailing slash is missing), some servers return 301, and some return 302. Strictly speaking, we can only assume that the browser will automatically redirect only if the original request is get. See 307. 303 See other is similar to 301/302, except that if the original request is the Post,location header the specified redirect target document should be fetched via get (HTTP 1.1 new). The 304 not modified client has a buffered document and issues a conditional request (typically providing a if-modified-since header indicating that the customer only wants to update the document than the specified date). The server tells the customer that the original buffered document can continue to be used. 305 use proxy the document requested by the client should be extracted via the proxy server indicated by the location header (HTTP 1.1 is new). 307 Temporary redirect and 302 (Found) are the same. Many browsers incorrectly respond to a 302 response for redirection, even if the original request is post, even though it can actually be redirected only if the answer to the POST request is 303. For this reason, HTTP 1.1 has been added in 307 to allow for more cleanup of the region in several status codes: When a 303 response occurs, the browser can follow the redirected get and post requests, and if the 307 answer, the browser can only follow the redirect to the GET request. (HTTP 1.1 new) 400 bad request request syntax error. 401&nbsP unauthorized customer attempts to access password-protected pages without authorization. A www-authenticate header is included in the answer, and the browser displays the user name/Password dialog box, and then makes a request again after filling in the appropriate authorization header. 403 forbidden resources are not available. The server understands the customer's request, but refuses to process it. This is usually caused by the permissions set on the file or directory on the server. 404 not found cannot find a resource at the specified location. This is also a common answer. 405 method Not allowed Request methods (GET, POST, HEAD, DELETE, PUT, trace, etc.) do not apply to the specified resource. (HTTP 1.1 new) 406 not acceptable The specified resource has been found, but its MIME type is incompatible with the client specified in the Accpet header (HTTP 1.1 new). 407 proxy authentication required is similar to 401, which means that the customer must be authorized by the proxy server first. (HTTP 1.1 new) 408 request timeout The customer has not made any requests during the waiting time of the server license. Customers can repeat the same request at a later time. (HTTP 1.1 new) 409 conflict are usually related to put requests. The request cannot succeed because the request conflicts with the current state of the resource. (HTTP 1.1 new) 410 gone The requested document is no longer available, and the server does not know which address to redirect to. It differs from 404 in that returning 407 means that the document has permanently left the specified location, and 404 indicates that the document is unavailable for unknown reasons. (HTTP 1.1 new) 411 Length required The server cannot process the request unless the client sends a content-length header. (HTTP 1.1 new) &NBsp; 412 precondition failed Some of the prerequisites specified in the request header failed (HTTP 1.1 new). 413 Request Entity Too large the size of the target document exceeds the size that the server is currently willing to handle. If the server thinks it can process the request later, it should provide a Retry-after header (HTTP 1.1 new). 414 Request URI Too long URI is too long (HTTP 1.1 new). 416 requested range not satisfiable server does not meet the Range header specified by the customer in the request. (HTTP 1.1 new) 500 Internal server error servers encountered unexpected conditions and could not complete customer requests. The 501 not implemented server does not support the functionality required to implement the request. For example, a customer sends a put request that is not supported by the server. 502 Bad gateway server as a gateway or proxy, the server returned an illegal reply in order to complete the request to access the next server. 503 Service unavailable Server failed to answer due to maintenance or heavy load. For example, a servlet might return 503 if the database connection pool is full. A retry-after header can be supplied when the server returns 503. 504 Gateway timeout is used by a server acting as a proxy or gateway, indicating that it is not able to get answers from remote servers in a timely manner. (HTTP 1.1 new) 505 HTTP version not supported server does not support HTTP versions indicated in the request. (HTTP 1.1 new) reference: Http://blog.csdn.net/elifefly/article/details/3964766/
HTTP 1.1 vs. HTTP 1.0