Looking at the network tab, it looks like they (at least with chrome) are using events sent by the HTML5 server.
Thus, in practice, the browser subscribes to the stream of events, and the web server simply sends messages.
I am not an expert, but I suppose on the server side you need to have an open connection that sends events to the client.
I found the python SSE implementation here: https://github.com/niwibe/sse and the django implementation on top of this: https://github.com/niwibe/django-sse
I have not used them (yet) on any products, so I offer them only as material for study / poc :)
source share