Why can we not have UDP connection between a browser and a server? Why is TCP connection possible (via WebSockets) and UDP not?
HTML5 does not allow arbitrary TCP connections.
Instead, web sockets is a special new protocol built on on TCP that allows bidirectional communication.
Similarly, WebRTC is a special new protocol built on UDP that allows peer-to-peer communication.
Allowing arbitrary socket connections would be a major security hole.