When sending SSE message from a server there is a parameter retry that can be put into a message. (https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#fields).
The reconnection time to use when attempting to send the event. This must be an integer, specifying the reconnection time in milliseconds. If a non-integer value is specified, the field is ignored.
But I actually can not get what is it about. Can someone clarify what is this parameter for how it is supposed to work? I don't get what it is for and who (server or client?) is supposed to use it, and what for?
It’s a client instruction: the browser will wait the specified time after it detects a broken connection (because the server closes the connection after a message perhaps) before re-establishing a connection to the SSE resource url.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With