I am streaming data from a websocket server (python software) to a webpage. When I access the webpage the websocket connection is made and I have some HTML code that starts plotting the data. As a new messages come in the graph updates.
Currently, when I refresh the page all the incoming data is lost, the plot empties and has to wait for a new message to come in before it starts plotting again.
Ideally I would like the client to always be listening to the server and saving the data somewhere so that when I access the page I can see a plot for the entire day rather than from when I loaded the site and when I refresh the page the graph does not reset. Is this possible? Any help or guidance in the right direction would be greatly appreciated,
Thanks
To store data on your webpage even when restart you can :
Use Cookie Session to store data on your browser. You can also use Local storage or Session storage. Such as it will be lost when you will change/restart your browser, it doesn't always work
Ask to the python server for all data. This need changes in the server side, and also to store the data in the server side.
Use a third platform to store the data. You can push it from the server to retrieve it, or just send from the client to the third, and get all old values when refresh the webpage.
I suggest you the first one that can correspond to what you want. Else, you will need something else to retrieve all needed data if you change your browser/want to get created data before you join the page.