首页 > 解决方案 > Chrome devtools 显示 h2 而不是 quic/h3(即使页面使用的是 HTTP/3.0)

问题描述

作为一名开发人员,我对 HTTP/3.0 的下一个版本感到非常兴奋。前段时间我注意到,当我打开 Google.com 时,我可以在 Devtools > Network 中看到该协议显示为 Quic。但是现在当我打开它时,我只看到 h2 。这是为什么?

我还注意到 alt-svc 标头表明该资源也可以快速使用。但它仍在通过 h2 加载。

alt-svc: quic=":443";

在此处输入图像描述

我在使用 curl 时注意到同样的事情,使用的协议是 h2 而不是 h3。但谷歌多年来一直在使用 Quic。为什么会发生这种变化?

curl -v https://www.google.com/

* ALPN, offering h2
* ALPN, offering http/1.1
* ALPN, server accepted to use h2
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)

> GET / HTTP/2
> Host: www.google.com
> User-Agent: curl/7.61.1
> Accept: */*

标签: google-chromehttptcpgoogle-chrome-devtoolsquic

解决方案


推荐阅读