您什么时候应该通过HTTP2使用节点的HTTP?
在哪些情况下,您应该在http2
模块上使用节点中的http
模块?即使使用http/2的连接更快,大多数网站已经切换到它,大多数人和库似乎仍在使用http
模块。这是什么原因?提前致谢。
In which cases should you use the http
module in node over the http2
module? The majority of people and libraries seem to still be using the http
module, even though connections using HTTP/2 are faster and most websites have already switched to it. What's the reason for that? Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
HTTP/2启用完整的请求和响应多路复用。实际上,这意味着可以使用浏览器与Web服务器建立的连接来发送多个请求并接收多个响应。这消除了为每个请求建立新连接所需的许多额外时间。
HTTP/2 enables full request and response multiplexing. In practice, this means a connection made to a web server from your browser can be used to send multiple requests and receive multiple responses. This gets rid of a lot of the additional time that it takes to establish a new connection for each request.