Once upon a time, http was a protocol designed to transport text and html, such as paper or magazine. This data must be complete and reliable, so http is based on TCP, not UDP.
Later, people wanted to display several media through a browser. Some applications, such as flash and windows media player, sneaked into the browser and launched the background as a plugin. They can play video with UDP, and the browser does not lose sight.
Currently, we want more, even with an index of stocks or chats, of those real-time scenarios that are not suitable for http. Finally, the web socket is imported.
You see, the browser does not need UDP because of historical reasons. These plugins may be video.
Anderson
source share