id: 1042
event: price
data: {"symbol":"ACME","price":12.5}
The browser sends a
Last-Event-ID header with the last id it receivedThe browser sends a Last-Event-ID header with the last id it received. This works when the server gives each event an id field. EventSource remembers the last id. When it reconnects, it sends that value in the Last-Event-ID header. The server then sends again the events the client missed. The server can also send a retry: field to set how long the browser waits before it reconnects.
"The client resends its last message body" is wrong. SSE (Server-Sent Events) is one-way, from server to client, so the client sends no message bodies.