更新时间:2023-12-03 10:12:52
理论上,一旦 nextHopProtocol
登陆 ResourceTiming 和 NavigationTiming ,您应该能够检测到对根页面和其他资源的 h2
支持。
h2
,并推断HTML页面为 h2
。 Hi guys I am searching for a script which can detect if the visitor's browser has enabled SPDY or HTTP/2.
Something like this https://www.ist-http2-aktiviert.de/
Theoretically, once nextHopProtocol
lands in ResourceTiming and NavigationTiming, you should be able to detect h2
support for the root page and other resources.
As of 2016-06-06, nextHopProtocol
is only available in Firefox's ResourceTiming implementation. It is not available in their NavigationTiming, or in either NavigationTiming nor ResourceTiming for Chrome, FF, and Safari.
So for Firefox visitors today, you could see if nextHopProtocol
is h2
for other resources on the same domain as the HTML page, and infer that the HTML page is h2
as well.