9.1 http

You are already very familiar with the http protocol. But, most likely, you do not know that there are already three versions of such protocols. As a future Java programmer, you should familiarize yourself with this case at least once.

Below I will tell you what types of protocols are and what are their features. In the meantime, here's a picture for you - study.

http protocols

9.2 https

Let's start with the first modification of the http protocol - the https protocol . This is the same http, but content encryption has been added to it. After all, Http requests and responses are ordinary text files. You probably wouldn't want everything your browser sends and receives to go over the Internet in the clear.

To solve this problem, the https protocol ( http+security ) was invented . When you try to make a request using the https protocol, your browser first establishes a connection to the required server and asks it for its SSL certificate.

Then this certificate is checked for authenticity: it contains the name of the domain and a list of public keys of those who issued this certificate to the server.

If the certificate is genuine, then the browser establishes an encrypted connection to that server. And already within this connection, data is transmitted via the http protocol.

And since information about the requested resource is transmitted in the protocol itself, when using the https protocol, no one can intercept information about which server resources the browser accessed.

Today, this protocol has become the de-facto standard and has almost supplanted the good old http.

If someone tries to replace the server to which you send an https request, then he will not be able to replace the domain certificate. The browser will understand this, and you will see a page like this:

9.3 http/2

But there is nothing in this world that cannot be improved. After Google won the browser war , it decided to take over the entire Internet for itself. And, of course, for a noble cause. They decided to improve the http protocol.

No sooner said than done. Added to the new data transfer standard:

  • Mandatory encryption.
  • Data compression in HTTP headers.
  • The server can send files even before they are requested (push technology).
  • There can be multiple http requests over a single TCP connection.
  • Requests are processed like a pipeline (no need to wait for a response to send a new request).
  • The protocol is binary (no need to translate non-printable characters into text).

Much of this is hidden from the Java programmer and maintained at the web server and browser level.

9.4 http/3

The third version of the http protocol is still being finalized and its biggest innovation is the rejection of the TCP protocol. The data will go immediately over UDP.

Like this. People came up with the OSI model, they came up with it, and here you are. What not to do for the sake of speed. On the other hand, it might be right. Today, a lot of streaming video is transmitted on the Internet, and God himself ordered to use UDP there.

Oh, with the charms of this protocol, you will already be playing. I already finished mine :)

You can read more about http/3

undefined
3
Опрос
HTTP protocol,  9 уровень,  8 лекция
недоступен
HTTP protocol
HTTP protocol