issue 7571 - SSE - add Keep-Alive Messages definition #7572
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #7571: Server-Sent Events (SSE) - add Keep-Alive Messages definition
"...authors can include a comment line (one starting with a ':' character) every 15 seconds or so."
This is helpful for SSE clients. The SSE client can read the keep-alive messages, and detect whether the connection is alive.
Thing is, since the keep-alive messages mechanism is not mandatory, the SSE client can use this condition only if the keep-alive mechanism is used, since when it is not used, it is a valid scenario that no message is received for a long time, even when the stream is alive.
Problem:
keep-alive message is not well-defined.
Suggested solution - added the part in bold:
authors can include a comment line (one starting with a ':' character) starting with ":keepalive" every 15 seconds or so.
This way, the SSE client can detect if keep-alive mechanism is used by checking if it received a keep-alive message as defined.
/acknowledgements.html ( diff )
/browsers.html ( diff )
/browsing-the-web.html ( diff )
/canvas.html ( diff )
/custom-elements.html ( diff )
/dom.html ( diff )
/form-control-infrastructure.html ( diff )
/grouping-content.html ( diff )
/history.html ( diff )
/iframe-embed-object.html ( diff )
/images.html ( diff )
/index.html ( diff )
/input.html ( diff )
/interaction.html ( diff )
/origin.html ( diff )
/references.html ( diff )
/scripting.html ( diff )
/sections.html ( diff )
/semantics.html ( diff )
/server-sent-events.html ( diff )
/structured-data.html ( diff )
/syntax.html ( diff )
/text-level-semantics.html ( diff )
/urls-and-fetching.html ( diff )
/web-messaging.html ( diff )
/webappapis.html ( diff )
/window-object.html ( diff )
/worklets.html ( diff )