Several specialized sites and other portals have explained the technical details behind HTTP/3, the new version of the HTTP protocol that includes multiple improvements, starting with a more robust recovery from packet loss. These days, HTTP/3 is only a draft under evaluation, but Chrome and Firefox already have official support, disabled by default. Today we'll show you how to enable it in both browsers.
HTTP version 2 has served us well since its debut, but we can't deny that the web has changed a lot in the last five years. Constant connections and streaming continue to multiply, and although everything seems to work fine on the surface, there are some conflict points in the current protocol.
One of them is the dependence on TCP. That is not a problem in itself, but TCP's recovery mechanisms are blind to HTTP/2 multiplexing, causing unnecessary delays and pauses if packets are lost. That's where HTTP/3 comes in, which works with the help of the QUIC protocol originally developed by Jim Roskind at Google. In relaxed terms, TCP is retired in HTTP/3, leaving multiplexing, negotiation, and recovery under QUIC's wing, and UDP takes over as the transport layer.
So, if you put those benefits on the table, how do we enable it? The only warning is that HTTP/3 is in draft phase, so it is considered an experimental feature. That means there aren't many sites with the ability to properly use HTTP/3, and there is a possibility (though remote) that some sites will fail to load or show errors with HTTP/3 enabled. That said, let's begin.
HTTP/3 in Firefox
The latest stable version 78.0.1 supports HTTP/3 out of the box, but we need to visit about:config and change the value network.http.http3.enabled from false to true. Restart the browser, and that's it.
HTTP/3 in Chrome
HTTP/3 and QUIC are supposed to be used with Chrome's Canary builds, but today we can test it in the stable version. First, go to chrome://flags, type 'QUIC' in the search box, and change the option “Experimental QUIC protocol” from Default to Enabled. Chrome will ask you to restart the browser, but that's not enough.
To fully enable this technology, the second step is to add two switches to the Chrome shortcut: --enable-quic --quic-version=h3-46. The QUIC version in the switch may change over time, but '46' seems to work quite well.
How to verify HTTP/3 is working
How do we check if HTTP/3 and QUIC are working? There are two sites for that: the official LiteSpeed page, and quic.rocks. The confirmation requires pressing F12 to open developer options, going to the Network tab, reloading the page, and enabling the Protocol column. Firefox displays it as HTTP/3, while Chrome should say HTTP/2+QUIC/46.
If something goes wrong, it's enough to undo the aforementioned steps. Give it a try!