Chrome 怎样知道网站启用了SPDY 协议

这个涉及到HTTP的Upgrade header的应用。具体可见这个例子:GET /page HTTP/1.1Host: server.example.comConnection: Upgrade, HTTP2-SettingsUpgrade: HTTP/2.0 //Initial HTTP 1.1 request with HTTP 2.0 upgrade headerHTTP2-Settings: (SETTINGS payload) //Base64 URL encoding of HTTP/2.0 SETTINGS payload如果服务器拒绝使用SPDY4或HTTP/2.0,则回应以下。然后继续使用HTTP/1.1。HTTP/1.1 200 OK //Server declines upgrade, returns response via HTTP 1.1Content-length: 243Content-type: text/html如果服务器接受使用SPDY4或HTTP/2.0,则回应以下。然后使用HTTP/2.0来进行之后会话。HTTP/1.1 101 Switching Protocols //Server accepts HTTP 2.0 upgrade, switches to new framingConnection: UpgradeUpgrade: HTTP/2.0
■网友
地址栏输入chrome://net-internals/#spdy在host后查看协议,google和dropbox用https协议的开启了 【Chrome 怎样知道网站启用了SPDY 协议】 Chrome 怎样知道网站启用了SPDY 协议

3. 也可以通过安装插件来查看(SPDY Indicator)Chrome 怎样知道网站启用了SPDY 协议


    推荐阅读