"HTTP authoritative guide" reading notes one

Source: Internet
Author: User

Keep track of some of the knowledge points in reading the HTTP authoritative guide for future use.


URL section

Rstp://www.123.com/1.mp4 RSTP Download Protocol

FTP scheme in URL: ftp://username:[email protected]/file_name

Parameters in URL: parameter name = value Eg:www.123.com/index.html;type=value

Query in URL: http://www.123.com/...?item=123

Fragment in URL: http://www.123.com/index.html#drills

Description of the fragment: the browser requests only the drills fragment in index.html, but the server only processes a complete request and still returns the entire index.html. The browser is displayed to the user from drills at the time of parsing. That is, the fragment is in effect for the client.

URL-Safe methods:

Get method: Request the server to send a resource

Head method: The server only returns the requested header

Put method: Write a document to the server

Post method: Submit a form to the server (the request body part is the content that needs to be submitted in the form)

Trace method: The client receives a response message that contains the final request message from the server (the request message sent by the client may be modified at the time of the firewall before it reaches the server.) This way, the server will return the request after the firewall has been modified to the client)

Options method: Query the method supported by the service side, the server will return the name of the supported method

Delete method: The request server deletes the resource specified in the URL


HTTP messages

Request message, Response message (starting line, header, body)

If-modified-since: Read only documents that have been modified since a certain time

304 Not Modified: recent resource not modified


HTTP connection

HTTP connection established: 1, DNS resolution URL (host + port number)

2. Browser-Server Establish TCP connection

3. The browser sends the request

4, the service side returns the request, the browser receives

5. Close the connection

TCP Three-time handshake: 1, C--------SYN------>s

2, c<----syn+ack--s

3, C-------ACK------>s (when the last handshake, you can bring the request data)

Serial connection: When a page is requested (a page includes pictures, CSS,JS, etc.), each HTTP request sequence is

Parallel connection: When a page is requested (a page includes pictures, CSS,JS, etc.), each HTTP request is concurrent concurrently (the Web server may limit the number of simultaneous connections per client)

Persistent connection: After the HTTP connection request is complete, the connection remains open and the next request requires no re-establishing the connection (keep-alive/persistent). If the server supports persistent connections, the header of the response message will contain: connection:keep-alive field

keep-alive:max=5,timeout=120 says: The server can also keep the connection open for another 5 transactions, or the open state remains until the connection has been idle for 2 minutes.

If the browser wants the connection to be established for this request to persist, it will include the Connection:keep-alive field in the header of the request, and if the server returns the Connection:keep-alive field, it is agreed to keep the connection open State.

http/1.1 Persistent Connection: http/1.1 The persistent connection is turned on by default. If you want to close the connection, you need to add: Connection:close field in the header.







"HTTP authoritative guide" reading notes one

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.