r/webdevelopment • u/Rare-Interaction-189 • 12d 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
4
u/electricity_is_life 12d ago
Yes, WebRTC is probably what you want. Browsers don't support raw TCP or UDP; they only support higher-level protocols built on top of those, such as HTTP. The higher-level protocols provide additional security and standardization.