How to check if website has http/2 protocol support

后端 未结 5 1652
栀梦
栀梦 2020-12-05 06:43

There is a lot of topics about http/2 protocol, but I wonder if there is a working website with this protocol.

i.e.

We can decide to use http:// o

相关标签:
5条回答
  • 2020-12-05 07:07

    You can also use a cool chrome/firefox extension called HTTP/2 and SPDY indicator to check website protocol

    0 讨论(0)
  • 2020-12-05 07:11

    HTTP/2 reuses the http:// and https:// schemes rather than use new ones.

    All browsers only support HTTP/2 over https:// and part of the SSL/TLS negotiation is to communicate whether both sides support HTTP/2 and are willing to use it (using an extension to SSL/TLS called ALPN).

    The advantage for this is you can just connect to a website and if your browser supports it, it will automatically negotiate HTTP/2, and if not it will automatically fall back to HTTP/1.1.

    So to test for HTTP/2 support you can use the browser as Markus's suggests (make sure to add the Protocol column to the Network tab in Chrome for example).

    Or you can use an online tester like https://tools.keycdn.com/http2-test

    Or you can use a command line tool like openssl (assuming it's been built with ALPN support): openssl s_client -alpn h2 -connect www.example.com:443 -status.

    Most of the larger websites (e.g. Twitter, Facebook, Amazon, Stack Overflow) are using HTTP/2 now.

    0 讨论(0)
  • 2020-12-05 07:12

    Open browser devtools and switch to network tab. There you'll see h2 if http/2 is available.

    0 讨论(0)
  • 2020-12-05 07:17

    Open Dev Tools in Chrome using F12,

    Then go to Network tab.

    Right click on a row, select Header Options, and then select Protocol from the menu.

    0 讨论(0)
  • 2020-12-05 07:18

    You can just check it in: Chrome Dev Tool (F12) > Network > Protocol

    It will tell you the protocol used and the domain of each transfer.

    Legend

    http/1.1 = http 1.1
    h2          = http 2.0


    Note: If you cannot see the Protocol column just right-click on any header and check the "Protocol" label.

    0 讨论(0)
提交回复
热议问题