Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force HTTP/2 With Chrome or Safari

Is there some way to tell Chrome or Safari to use HTTP/2 on a specific URL/adress/server?

I mean by changing some setting or such, not by implementing ALPN on the server socket or whatever might be needed. I want to try HTTP/2 on a server socket without waiting till I can have ALPN negotiation to tell the browsers to use HTTP/2.


Clarification: I have HTTP/2 enabled on Chrome (aka SPDY/4 via chrome://flags). It still doesn't probe my (TLS or plaintext) socket for HTTP/2 via Upgrade. I want to force Chrome to either do this, or assume HTTP/2 right off the bat.

Also, I've read that Chrome won't support HTTP/2 over plaintext connections, even though the HTTP/2 standard allows it. But maybe there's some way around that.

like image 690
Jonas N Avatar asked Apr 01 '15 19:04

Jonas N


1 Answers

HTTP/2 over TLS and HTTP/2 over TCP have been defined as 2 different protocols, identified respectively by h2 and h2c.

Chrome supports h2 only at this time.

If you have a server that implements only h2c, the easiest way to connect Chrome to it is to use a reverse proxy such a nghttpx in HTTP/2 bridge mode in front of your server

like image 191
rluta Avatar answered Oct 09 '22 05:10

rluta