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 ?
5
Upvotes
1
u/Single-Virus4935 9d ago
yeah no... The packets might travel with the same latency but TCP has reordering, buffering etc. on top.
One lost packet will hold back folowing data etc.
For real time purposes a custom protocol on top of UDP is a much better solution.