Skip to content

Commit

Permalink
docs(protocol): note including an empty data field in the complete me…
Browse files Browse the repository at this point in the history
…ssage
  • Loading branch information
enisdenjo committed Mar 27, 2024
1 parent 3f8e8ff commit 80cf75b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions PROTOCOL.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ interface CompleteMessage {
}
```

> [!IMPORTANT]
> Include an empty `data: ` field when sending the message to a client that uses [EventSource](https://developer.mozilla.org/en-US/docs/Web/API/EventSource). If the field is omitted, the complete event won't trigger the listener.
## Single connection mode

> When **not used over HTTP/2**, SSE suffers from a limitation to the maximum number of open connections, which can be specially painful when opening various tabs as the limit is per browser and set to a very low number (6). The issue has been marked as "Won't fix" in [Chrome](https://bugs.chromium.org/p/chromium/issues/detail?id=275955) and [Firefox](https://bugzilla.mozilla.org/show_bug.cgi?id=906896). This limit is per browser + domain, so that means that you can open 6 SSE connections across all of the tabs to `www.example1.com` and another 6 SSE connections to `www.example2.com`. (from [Stackoverflow](https://stackoverflow.com/a/5326159/1905229)). When using HTTP/2, the maximum number of simultaneous HTTP streams is negotiated between the server and the client (defaults to 100).
Expand Down

0 comments on commit 80cf75b

Please sign in to comment.