This is possible thanks to TCP Sockets .
A normal link connection creates a single path of communication with the server.
In other words, the client has to be making requests to the server to receive their answers. In the case of a realtime environment, this would be very cumbersome, ie the client would spend all the time asking the server for updates.
When you create a TCP Socket, you have two communication paths, ie the client knows the server, the server knows the client, and can send messages to the client.
/ p>
What you noticed on the site of globoesporte.com, is exactly a connection created by a socket, basically what happens is as follows.
When you enter the site to follow the realtime game, the browser asks the server to establish a socket connection, thus creating a hub , so your browser does not need to stay making requests every second to check if there is any update to show you, but the server that will send a message to your browser.
I do not know which language server you use, but I use C #, which has a great socket solution, the SignalR, Here is a microsoft tutorial on SignalR .
I know Java also has a socket solution, but I do not know its name.