Can I get some feedback on the following idea please: - Maintain an open (but idle) websocket connection on your page to have an accurate real-time visitor information. The websocket should remain open as long as the user doesn't close the tab or navigate away. What are some cons that prevent everyone from doing so?
Everyone does do so already (though not necessarily with websockets; occasional pings are sufficient and more widely supported). Google Analytics has a real-time dashboard. So do most web analytics platforms these days.
I figured the real-time dashboard of Google Analytics must be doing something similar, but I don't know what exactly they use.