HTTP Basic Combat

Source: Internet
Author: User

1. Requirements

Learn the basics of HTTP and get to know the network under Chrome

2. Front-facing knowledge

Here are some things about the TCP/IP protocol, which is enough today to understand only the application layer's HTTP.

What is 3.http?

We browse the Web page, send an HTTP request to the server, the service side recognizes that the HTTP request will return an HTTP response to the client.

Is the pattern of a request, a response.

So what does the HTTP request and HTTP response contain?

Direct combat.

4. Actual Combat section

is the HTTPS request to open a picture of Baidu (more than the HTTP layer of encryption layer). We'll look at it in 3 parts!

A.general part

There is a request address, a request method, a status code returned, a remote IP, and a port number.

Here, the main message of the request and response is displayed to the user.

B. Response header

Accept-ranges:bytes indicates that the server can accept the request part of the file

cache-control:max-age=2628000 represents 2.628 million seconds to request again, and will not request the server to obtain the data, but directly with the previous request to come over the data

Connection:keep-alive means persistent links

content-length:2605 represents the length of the returned content, in bytes content-type:image/jpeg C. request Header accept:image/webp,image/*,*/*;q=0.8 Represents the data type received by the client accept-encoding:gzip, deflate, SDCH, BR indicates that the server can compress the data before transmitting it, but the compression must be in the following ways, otherwise the client cannot recognize the Accept-language: zh-cn,zh;q=0.8 indicates that the client receives a Chinese cookie: The cookie information is brought to the server user-agent:mozilla/5.0 (IPhone) When the request is made; CPU iPhone os 9_1 like Mac os X) applewebkit/601.1.46 (khtml, like Gecko) version/9.0 mobile/13b143 safari/601.1 represents some client's letter Can be obtained from the server. Look again at the section on cookies

The request cookies indicate that the requests will bring these cookies to the server, and the response cookies indicate that the cookies are set by the server on the client.

5. Summary

Here is just about the basic knowledge of the next HTTP, there are a lot of knowledge, I hope to be helpful to everyone.

  

HTTP Basic Combat

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.