Answer the question
In order to leave comments, you need to log in
How to transfer critical data via websocket?
Situation: when the page is loaded, quite a lot of information is loaded by ajax to fill the page, and after loading, the information is connected to update the content. Very small data (only changes) are transmitted via web sockets, which javascript already compares with its own data and inserts into html.
How to make it so that if an event occurs during the connection to websockets, then somehow get it?
How, despite network problems, to receive valid information from the server (!!! DATA SEQUENCE IS IMPORTANT !!)?
How to implement all this so as not to miss more than one event, but also transfer little data via web sockets (not the entire array, but only changes)? Mb there are some libraries?
Answer the question
In order to leave comments, you need to log in
Resend timestamp with each data packet.
When connecting / reconnecting, send the last received label.
The server sends the data changed since the last label.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question