使用HTTP1.1协议的服务器可以使用HTTP2协议提供来自浏览器的请求吗

发布于 2025-01-22 12:18:31 字数 86 浏览 1 评论 0原文

例如,我有一个节点服务器,该节点服务器使用内置模块“ HTTP”(我假设是HTTP1.1版本)。那么,它将能够使用HTTP2协议向浏览器提供任何XHR请求吗?

For example I have a node server which uses the built-in module "http" (which is http1.1 version I assume). So will it be able to serve any XHR request from browser with http2 protocol?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

假扮的天使 2025-01-29 12:18:31

是的。浏览器作为HTTPS设置的一部分协商HTTP/2(因为浏览器仅支持HTTP/HTTPS上的HTTP/2)。如果双方不支持HTTP/2,它将仅使用HTTP/1.1

感谢HTTP/2的伟大事物之一,以及为什么它取得这样的进展 - (几乎!)无缝地将其推出到网络而不会破裂的能力现有站点/服务器/浏览器。

Yes. Browsers negotiate HTTP/2 as part of the HTTPS setup (since browsers only support HTTP/2 over HTTPS). If HTTP/2 is not supported by both sides it will just use HTTP/1.1

Thanks one of the great things about HTTP/2 and why it’s made such headway - the ability to (almost!) seamlessly roll it out to the web without breaking existing sites/servers/browsers.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文