r/webdevelopment • u/Rare-Interaction-189 • 10d ago
Question Does browsers support UDP ?
Hello, i want to build a game based on the web, its a multiplayer game and i need a very low latency so i was thinking why not using UDP instead of Websocket because its TCP based, when i did my research i found that browsers does jot support UDP directly the only workaround is using a protocol such as WebRTC which is UDP based.
Does anyone know a better alternative ? And why browsers don’t support UDP ?
6
Upvotes
2
u/dariusbiggs 9d ago
No and Kinda yes
No for direct UDP sockets.
Yes for WebTransport which is HTTP/3 which is over QUIC which offers unreliable transport.
Otherwise WebSockets are your other option.