We open a web page , Now just click on the icon , Even if you type in a web page , Just as long as “xxx.com” Everything else will be completed automatically , We used to know www It means the world wide web （ Poke it here ）, That's the front one https:// What is it ？
understand HTTPS Before , You have to understand HTTP, Full name Hyper Text Transfer Protocol Hypertext transfer protocol , Very understanding , After all, there can't be only words in a web page , And pictures and videos . Corresponding to that , If you are transferring files , Then there are FTP agreement .
This agreement is used to transfer information from WEB Download... On the server HTML Hypertext markup language to ontology browser display , be based on TCP/IP Communication protocol . When you enter a URL , It's not really a website , For example “ Zhang San ” Just a name, not a person , It refers to a person who is complete . So the precise location on the Internet is IP,
After entering the web address, we'll go through the local host、 as well as DNS Domain name resolution service , For example pixiv I couldn't get on it before , You can modify the local host Realize normal access .
You can understand it as "Cha" “ Xinhua dictionary ” Translate for you , Convert to the exact one IP, And then there was TCP Of 3 The second handshake , To send HTTP request , The server will return you another HTTP Respond to , To the local , This code for you , After browser rendering , Where is the word , Where does that picture go , Finally, a complete web page is loaded .
At this time we can find , The difference between web pages and software is , The software is already in your hard disk , You set the switch on and off 、 fixed , But Web pages don't exist completely , Every thing you order 、 One submission , He's going to load it all over again , It's all a new link , Even have to log in again .
So we go to the older pages 、 Or when you went online many years ago , It's very slow to open a web page , It has to do with your Internet speed 、 Operators don't matter much , It's just that the agreement itself is old 、 Low efficiency .
You can go to http2.akamai.com/demo Run a comparative test , This thing runs with Cinebench equally , Similar to the difference between single core and multi-core .
HTTP After four versions ,1991 year Only one time GET Ordered 0.9 edition .1996 year Officially standardized 1.0 edition , Added to Images 、 video 、 Binary Support for , And there is cache Caching features , To visit the same website again, just reload the local cache ,1.0 It's a milestone for the modern Internet experience .
1997 year Of 1.1 Finally, it supports long lasting connection , And optimized bandwidth , It's faster , It can also be continued , But we still have to deal with the responses one by one , Still not fast , There were a lot of Web optimization techniques in those years , It can be divided into two kinds , The first is to reduce the number of requests by merging , The second type is to open multiple persistent connections at the same time .
here we are 2015 year Of HTTP/2, Finally, there is a qualitative leap , New multiplexing mechanism , Equivalent to the web page from multi-core to multi-core era , In the past, you could only send and receive one express at a time , Now you can send and receive a bunch of express at a time . because （ Between the application layer and the transport layer ） Added binary framing , In other words, this generation began to transmit binary protocols , Make the delay lower 、 It takes less 、 More throughput .
Similar to the original one-way road driving a pile of cars carrying goods , Now with fewer big trucks , There's more on board per car , And it's multi Lane transportation at the same time .
As for logging back in , Later we used the familiar Cookie Record your login status , It's always on your computer , Or on the server Session, More secure , But the browser doesn't work as soon as it's turned off .
but HTTP There is a question , Because information is packaged together , Everything in the express box is written on it , It's easy to be cut off halfway , Even being switched , Or the shipping address has been changed , Not enough security .
So we hired a team of professional escorts ,HTTPS coming , This S yes Secure Safety means , It's using SSL agreement （SecureSocket Layer Secure socket layer ）,1997 year Loved by Netscape Netscape developed , you 're right , Namely Mozilla The Netscape browser that the project team came out later , It was the first to support HTML The frame shows , Let the web page have a more advanced visual experience （ Browser history stamp here ）.
Then there was a successor TLS（TransportLayer Security Transport layer security ）, Now it's time to 1.3 edition . Mixed encryption , There's also a verification mechanism , Very secure. Encryption is necessary , But encryption and decryption also eat resources , Working efficiency is much slower than not encrypting .
You shake hands with the server once , One round trip RTT（Round TripTime）, The connection of each layer protocol 、 handshake , Will increase RTT. Let's say you're on an extranet , Distance is very far , So once RTT Time to 70ms, So four times is 280ms, If one more TLS link , It's going to get slower .
Reference resources & quote ：
HTTP and HTTPSzhuanlan.zhihu.com/p/72616216
HTTP edition cnblogs.com/NetPig/p/10917269.html
Encryption difference blog.csdn.net/enweitech/article/details/81781405
Online process zhihu.com/question/34873227/answer/518086565
本文为[He took my life]所创，转载请带上原文链接，感谢