What is the use of http non persistent connection mode

This may seem like a trivial matter, but still ... I have a confusion about this.

On almost every site, I read that HTTP-persistent or supported connections are better than non-persistent ones. Ques: So why does inconstancy even exist?

Some say that the permanent has the disadvantage if the server serves many clients because users are disconnected. Ques: All the popular server servers of millions of clients, does this mean that they do not use persistent mode?

According to my understanding, I can think that search engines cannot use persistent connections.

Can someone please enlighten me on this topic.

Another doubt regarding HTTP requests. I read that if the page contains a link to several objects, then the web browser makes so many requests to get all of these (therefore, persistent connections are used). I doubt why all the objects are not embedded in the page and sent as one object? If the argument is that it makes the page heavy and does not support bandwidth, then in any case, the browser opens parallel connections to retrieve several objects that again put the same load on the network.

Well, I understand that this cannot be done for such an image search, but if the page contains several objects, then we can insert them into the page and send.

These may seem like silly questions, but I can't help. I have doubts, and I need to understand this, and you can help. Thanks

+7
keep-alive persistent-connection
source share
2 answers

The original HTTP specification always uses erratic connections; HTTP / 1.1 added persistence because it is more effective for web pages that embed many external objects (which were rare when writing HTTP / 1.0.)

However, although HTTP / 1.1 allows persistent connections, there are implementations that do not support them or that support HTTP / 1.0. For this reason, HTTP / 1.1 requires sending the Connection: keep-alive header to enable this function, and Connection: close to disable it.

You can include the media directly in HTML using base64 encoding the data and include it in the data: URL . This is usually not done because it slows down your web browser. With a standard HTML page, the browser can start rendering the page structure without waiting for the (rather large) embedded data: links to load.

+4
source

As you say, most web pages hosted on the Internet not only process less data, and no one can appreciate it. The HTTP server must be shared, and it must have a mechanism to avoid multiple requests in the dependency name. You say that the inconsistent method allows you to avoid blocking ports by one client for a long time, when the server may have to serve more clients, and this will add a lot of stress, it is not. Persistent connections actually reduce the load on the server by limiting the number of requests that it should serve.

We hope this persistent HTTP connection helps you understand.

0
source

All Articles