使用HTTP1.1协议的服务器可以使用HTTP2协议提供来自浏览器的请求吗
例如,我有一个节点服务器,该节点服务器使用内置模块“ 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的。浏览器作为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.