1991 year 8 month

My name is client , An English name client.

Her name is server , An English name server.

This year , We were born .

Yes , We are all 90 after .

I love her , But she is far away .

In order to talk to her , I also invented HTTP agreement .

A language that only she and I can understand in the world , A romance that only she and I can understand in the world .

Although I can only send her GET operation , She can only return HTML file , But it's enough .

When I send out GET /index.html when

She'll come back

<html>
<body>Hello World</body>
</html>

Maybe in her opinion , I'm her world, too .

I know I'm not perfect yet , So name yourself 0.9 edition , I look forward to becoming better myself in the future .

1996 year 5 month

This is my second diary .

Forgive me for rarely keeping a diary , After all, a well-known person said :" Normal people who write diaries ?!"

I just shared it with her before HTML, This is far from satisfying me , Now I also want to share images with her 、 video 、 Binary .

in addition , I also want to have more contact with her , Just like lovers want to hug and kiss besides holding hands , I have nothing but GET I still want to POST,HEAD.

Again , At my strong request , Can you give me a hint every time you communicate , It is always difficult to make complaints about the way out . therefore , Except for the data part , Every communication adds a header message , We all have a mental preparation. What are we going to do this time .

For example, in the request header information , Accept: */* Will tell her the type of data I can accept , If she returns data Content-Type:image/jpeg I knew she was going to share her beautiful photos ,

Content-Type:video/mp4 I knew I could see her beautiful video .

Last , alas , Sometimes girls are really a little wordy , So I'm in again HTTP The agreement adds Content-Encoding, Suggesting that she can compress the data .

such as

I will use Accept-Encoding: gzip, deflate To tell her the compression type I can accept , and Content-Encoding: gzip Just tell me her actual compression type .

You can see that now HTTP The protocol is a lot more complicated , But I want to say it's a special code for both of us , I'd like to record it , Become a good memory .

Another embarrassing problem is that , She doesn't think I'll be long , Every Tcp Links can only send one request , Send data and shut it down , It bothers me a lot , So when some browsers request , Used a nonstandard Connection Field .

Connection: keep-alive

So she knows , I've really had a long time this time , Don't disconnect easily .

But unfortunately , This is not included in the criteria .

No matter what , I think HTTP This time, the change is quite decent , So it's called 1.0 Well .

With this milestone , My communication with my server can be more colorful .

After all, long distance love , The most important thing is to be effective 、 Rich communication .

1997 year 1 month

As we learn more about , I think I love her more , So willing to do more .

The greatest dignity of a man , I put it first Connection: keep-alive Inclusion criteria , That is, it is not closed by default without declaration .

secondly , I can't stand the pattern that I ask and she answers , I want to send out as much love as I can at one time , So I introduced the pipeline mechanism , Allow me to make multiple requests at the same time , Of course, she followed the order , Just respond one after another , At least I have done it in place .

My efforts are also rewarded ,server Also very considerate to me back Content-Length Field , So that I can easily know how much data she gave me .

But sometimes she has too much to say , I really don't want to wait too long for her to respond when she's finished , So in addition to Content-Length, I'm here at the same time HTTP Added

Transfer-Encoding Field , This means that the response will consist of an indefinite number of data blocks .

such as

Before every nonempty data block , There will be one. 16 The number of decimal places , Represents the length of this block . And finally there's a size of 0 The block , It means that the data of this response has been sent . Here is an example .

HTTP/1.1 200 OK
Content-Type: text/plain
Transfer-Encoding: chunked 25
This is the data in the first chunk 1C
and this is the second one 3
con 8
sequence 0

such , I can get her reply right away , splendid .

Last , except GET POST Wait for the operation , I also added PUT PATCH All kinds of postures to communicate with her , Do you know .

Although it has been optimized a lot , But be modest as a man , So I named the version 1.1.

well , That's it , I will continue to work hard , For her .

2009 year

I heard that Google made it public SPDY agreement , It's still for me HTTP1.1 Inefficient problems ? I'm not very happy , I still like my HTTP agreement .

server And asked if I could also HTTP Also optimize , speechless , I passed my HTTP I've talked to her 18 I've been in love for two years .

be it so , I don't want to write. , How I love .

2015 year 5 month

Love a person , It's really going to make you better .

In order to get closer to her , I'm going to give it a good hand HTTP Optimized the next .

Though it is SPDY On the basis of , however , Is not important !

About the main points :

1、HTTP/1.1 The header of the version must be text (ASCII code ), Data body can be text , It can also be binary , Text parsing is certainly not as good as binary , So be direct and thorough , It's all binary .

So we can quickly understand each other's demands .

2、 I said before that I can send multiple requests at the same time ,server Deal with in order , But I don't want to take her responses one by one , So she can also return data to me simultaneously .

3、 The longer you fall in love , The more afraid the other party is of repeating things , So in addition to data bodies , I also compressed the header information this time . On the one hand, you can use gzip/ compress Compress , In addition, she and I maintain a head information table at the same time , All fields will be stored in this table , Generate a index number , I will not send the same field later , Send only index numbers , This increases the speed .

4、 This is the most important , The server can take the initiative to send resources to the client , Not that I have to make a request first . That is, when I leave 99 After step , The next step is for her to come to me .

There are too many optimizations this time , I decided to name it directly HTTP2.0, Of course, there will be 3.0,4.0. For her , I want to be better .

Conclusion

Once upon a time, cars and horses were very slow , Letters are far away , Life is enough to love one person .

Now ,HTTP Can let your love millisecond class convey to each other , But also wish you all like me , Get what you love , Be loved all my life .

BAT Code the agriculture , Transfer programmer ,Bug The little prince , The famous backer .

The wolf in the wind of Xier banner ,211 The God of failing in college , really · Brick carriers , false · Novelist .

A book about HTTP More related articles about love diary of

  1. Android Training cases ( 3、 ... and )—— To achieve the timeline effect ListView, Join local storage , Realize the effect of love diary !

    Android Training cases ( 3、 ... and )-- To achieve the timeline effect ListView, Join local storage , Realize the effect of love diary ! Sigh that the Spring Festival is coming , At the same time, I sigh that time is waiting for no one , Year after year , But I'm still android Rookie on the road , This is about ...

  2. Android Advanced controls ( 6、 ... and )—— Customize ListView Gao imitates one QQ Implementation of drag and drop list

    Android Advanced controls ( 6、 ... and )-- Customize ListView Gao imitates one QQ Implementation of drag and drop list When we do some friend lists or merchandise lists , Most of the needs may be list dragging , And we chose ListView, It's also because of the use of L ...

  3. SFC Game list ( Wikipedia )

    SFC Game list Japanese name Chinese Translation English version name Date of issue The publisher スーパーマリオワールド Super Mario World Super Mario World 1990 year 11 month 21 Japan nintendo エフゼロ F-Zero F-Z ...

  4. The experts summed up “ Love law ” Study Linux System , better .

    If you're in love , Then you must like her very much . Get to know her , Know what she likes to eat and play , Know what she needs , You can make her happy when she's angry , It's all in your fingers . Then you want to learn Linux Do you ? like Linux Do you ? Do you understand her ? Do you like Linux ...

  5. Friend chain &amp;&amp; Diary

    On the chain of friends , The following diary Chain of friends like best galgameの Kato Juju Third year of junior high school &&\(ACG\) The posture is bigger than me yx Juju prefer galgame Of shadowice czx ZigZag Chubby Wen Wen ...

  6. Love is easy. , It's not easy to get along. : When EntityFramework Fall in love with AutoMapper

    Plot begins Why love ? Problems with each other ? The greatness of women ? Plot ending ? Sometimes acquaintance is a kind of predestination , Love doesn't need too many reasons , One look is enough , When EntityFramework run into sb. AutoMapper, That's all. , Love is easy. ...

  7. Wechat applet development diary —— Gao fangzhihu daily ( Next )

    I have a special preference for Zhihu daily , Look at my blog and github You know the , He wrote several Zhihu daily reports of different technical types APP To make a wechat app, first of all, you have to html,css,js There is a certain foundation , And wechat apps API Be very familiar with I will have to ...

  8. Wechat applet development diary —— Gao fangzhihu daily ( in )

    I have a special preference for Zhihu daily , Look at my blog and github You know the , He wrote several Zhihu daily reports of different technical types APP To make a wechat app, first of all, you have to html,css,js There is a certain foundation , And wechat apps API Be very familiar with I will teach ...

  9. Wechat applet development diary —— Gao fangzhihu daily ( On )

    I have a special preference for Zhihu daily , Look at my blog and github You know the , He wrote several Zhihu daily reports of different technical types APP To make a wechat app, first of all, you have to html,css,js There is a certain foundation , And wechat apps API Be very familiar with I will have to ...

  10. Linux Study diary - Use EF6 Code First( Four )

    One . stay linux Upper use EF development environment VS2013+mono 3.10.0 +EF 6.1.0 Check it out first EF Is it right? 6 Of If not   see also Linux Study diary -EF6 Installation and upgrade of ( 3、 ... and ) Because of my database ...

Random recommendation

  1. change yum source address

    1. Get into yum Profile directory :cd /etc/yum.repos.d/ 2. Backup configuration files :mv CentOS-Base.repo CentOS-Base.repo.bak 3. Download Netease's configuration , Change to Netease's ...

  2. python Multithreading optimization for high performance code

    Take the common port scanner as an example The principle of the port scanner is simple , operation socket To determine the connection status and determine the opening of the host port . import socket def scan(port): s = socket.socket ...

  3. Swift3.0 Grammatical changes

    Write it at the front First of all, I would like to share with you the skills of learning new grammar : use Xcode8 Open your own Swift2.3 Project , choice Edit->Convert->To Current Swift Syntax- Give Way Xcod ...

  4. Java Brief introduction of data structure

    1. Array Concept : A linear set of storage elements . Array declaration and creation : dataType[] arrayRefVar = new dataType[arraySize]; Two dimensional array ( Multidimensional arrays ) Declare and create : dat ...

  5. 【 Data usage 】3k The rice database is available SNP Use

    --- Resume content start --- We often say that we fantasize about using existing data to publish articles with high scores , You bet , Such fairy tales happen every day , But how to take the first step is not clear to many of us , So we start with rice SNP In terms of the use of the database . http://s ...

  6. BZOJ1146 [CTSC2008] Network management Network The tree chain splits Chairman tree Tree array

    Welcome to visit ~ The source of the original text is —— Blog Garden -zhouzhendong Go to the blog Garden to see the solution Subject portal - BZOJ1146 Topic summary In a tree , Every point has a weight . There are two operations : 1. Single point modification 2. Ask about the tree chain between two points ...

  7. html Compatible with mobile browser

    In fact, the main thing is to change HTML Page declaration : Add the following code to the page , You can display it normally : <meta name="viewport" content="width=device ...

  8. Linux according to CPU、 Memory 、 disk IO、 Network performance monitoring 【 Reprint 】

    The address of this article is :https://my.oschina.net/chape/blog/159640 System optimization is a complex task . tedious . Long term work , Monitoring is needed before optimization . collection . test . assessment , After optimization, we also need to test . collection . assessment . prison ...

  9. 3-19( On the evening of ) require_relative and require. === operator The explanation of .

    kernel#require_relative Ruby tries to load the library named string relative to the requiring file's ...

  10. RDD Of the six :Action operator

    In essence Actions In the operator, through SparkContext Execute the submit job runJob operation , Triggered RDD DAG Implementation .  according to Action The output space of the operator will Action Operators for classification : There is no output . HDFS. S ...