Javascript keep appending on page reaload with websocket connection
I have an apl with chat using python and websockets. If user successfully authenticate his/her status in the database turns online. Database query collects the online status users every minutes and send a message to front end where I want to update the list from the websocket message. everything works fine until I log in with another account from a different browser. The first window keep appending the names not matter which browser I refresh this is happening only with the first opened browser window/tab. Any ideas how to collect data and append to front end with vanilla js and keep the data until its changes in the database so the new authenticated user append to list and every online members show up in the sidebar properly. Like the messenger sidebar. If you could please help. I appreciate