demo · v143
Protocol negotiator sim
Type your client offer list and your server's supported list. Watch the negotiation pick a winner (or fail), and see the actual HTTP headers Chrome would send and the server would respond with. The final "live" section attempts a real new WebTransport(url, { protocols }) against any URL you give it.
Behind a flag: WebTransport application protocol negotiation lands in v143 behind
chrome://flags/#enable-experimental-web-platform-features. The simulator works in any browser;
the live probe at the bottom requires the flag and a compatible server.
Negotiation simulator
client offers (one per line, ordered by preference)
server supports (set; unordered)
Wire format
Live probe — attempt a real WebTransport handshake
…
What the negotiation does
- Browser sends
WT-Available-Protocols: a, b, cin the connection request. - Server picks one with
WT-Protocol: ain its response. - The browser exposes the picked one as
transport.protocolafter the connection is ready. - If the server picks none, the connection still establishes (provided the underlying handshake succeeds) but
transport.protocolis the empty string.
const transport = new WebTransport("https://example.com/wt", {
protocols: ["game-v3", "game-v2", "chat-v1"],
});
await transport.ready;
console.log("server picked:", transport.protocol);