A love diary about http

Vernon novelist 2021-04-08 11:19:17
love diary http


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 .

版权声明
本文为[Vernon novelist]所创,转载请带上原文链接,感谢
https://qdmana.com/2021/04/20210408104917731X.html

  1. Scheme and implementation of front end page watermarking
  2. Why is 0.1 + 0.2 not equal to 0.3?
  3. JS arrow function this points to related practice
  4. CSS text decoration & text emphasis
  5. 2021必修 首门CSS架构系统精讲 理论+实战玩转蘑菇街
  6. 大前端
  7. The first compulsory CSS architecture system in 2021
  8. Big front end
  9. 你喜欢才是最好的,前端工程师常用的8个工具
  10. What you like is the best. There are 8 common tools used by front-end engineers
  11. Spring Boot + Vue3 前后端分离 实战wiki知识库系统
  12. Spring boot + vue3 front end and back end separation practical wiki knowledge base system
  13. CSS高级技巧总结
  14. CSS advanced skills summary
  15. HTML5教程 - HTML5 事件
  16. HTML5 tutorial - HTML5 events
  17. Vue和微信小程序的区别
  18. The difference between Vue and wechat applet
  19. HTML5和CSS3提高
  20. Improvement of HTML5 and CSS3
  21. HTML5和CSS3提高
  22. Improvement of HTML5 and CSS3
  23. NMN concept stock up and down limit, Harvard & 34; ageless drug & 34; only market speculation?
  24. 「HTML+CSS」--自定义加载动画【011】
  25. 「HTML+CSS」--自定义加载动画【010】
  26. 「HTML+CSS」--自定义加载动画【009】
  27. 「HTML+CSS」--自定义加载动画【008】
  28. "HTML + CSS" -- custom loading animation [011]
  29. "Custom" animation [CSS + 010]
  30. "HTML + CSS" -- custom loading animation [009]
  31. "HTML + CSS" -- custom loading animation [008]
  32. HttpServletRequest、通过request获得请求头、请求体等、解决中文乱码等问题
  33. HttpServletRequest, obtaining request header and request body through request, solving Chinese garbled code and other problems
  34. html2canvas 识别 svg 解决方案
  35. Solution of identifying SVG with html2canvas
  36. Web前端架构师
  37. Web front end architect
  38. 3000 yuan of financial software is less than 28 yuan of system, and the automatic accounting system is comparable to artifact
  39. Blessing of the sea
  40. IT兄弟连 HTML5教程 CSS3揭秘 小结及习题
  41. Summary and exercises of CSS3 in HTML5 course of it Brothers Company
  42. It's disassembled before it's on the market. The workmanship of Xiaomi 10 is unexpected, reducing maintenance costs?
  43. Vue自学之路5-vue模版语法(v-text,v-html,v-pre)
  44. Vue self learning 5-vue template syntax (v-text, v-html, v-pre)
  45. 【HTML】处理&lt;br&gt;换行符追加到前端换行无效的问题 --- html中渲染的字符串中包含HTML标签无效的处理方法,字符串中包含HTML标签被转义的问题 解决
  46. [HTML] processing & lt; BR & gt; the problem of invalid line feed when the line feed character is added to the front end --- the processing method of invalid HTML tag contained in the rendered string in HTML, and the problem of escape of HTML tag containe
  47. Vue自学之路5-vue模版语法(v-text,v-html,v-pre)
  48. Vue self learning 5-vue template syntax (v-text, v-html, v-pre)
  49. 7个Web前端程序员必须会用CSS技巧
  50. 10个优秀开源JavaScript模板引擎
  51. JavaScript基础知识及写法
  52. FB大规模重构React Native,Airbnb宣布回归原生,前端巨变来临?
  53. Seven web front-end programmers must be able to use CSS skills
  54. 10 excellent open source JavaScript template engines
  55. Basic knowledge and writing method of JavaScript
  56. FB large scale reconstruction react native, airbnb announced return to the original, the front-end changes coming?
  57. 网页HTML5视频播放器(兼容各主流浏览器)
  58. Web HTML5 video player (compatible with mainstream browsers)
  59. 前端开发需要掌握哪些技术?前端开发都学什么?
  60. 一本关于HTTP的恋爱日记