In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains the difference between long connection and short connection in HTTP. The content of the explanation in this article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn the difference between long connection and short connection in HTTP.
Short connections are used by default in HTTP/1.0. In other words, every time the client and server perform a HTTP operation, a connection is established, and the connection is interrupted at the end of the task. When a client browser accesses a HTML or other type of Web page that contains other Web resources (such as JavaScript files, image files, CSS files, etc.), every time such a Web resource is encountered, the browser will re-establish a HTTP session.
From HTTP/1.1, long connections are used by default to maintain the connection characteristics. Using the long-connected HTTP protocol, this line of code is added to the response header:
Connection:keep-alive
In the case of a persistent connection, when a web page is opened, the TCP connection used to transmit HTTP data between the client and the server will not be closed, and when the client accesses the server again, it will continue to use this established connection. Keep-Alive does not stay connected permanently, it has a hold time, which can be set in different server software (such as Apache). The realization of persistent connection requires that both client and server support persistent connection.
Thank you for reading, the above is the content of "the difference between long connection and short connection in HTTP". After the study of this article, I believe you have a deeper understanding of the difference between long connection and short connection in HTTP, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.