question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Q: Server Sent Event - maximum string length?

See original GitHub issue

Hi, I was just experimenting and sent a content with a length of 95785 characters:

res.write("data: "+ content + "\n\n");
res.flush();

I do not receive any message in the browser until I remove gzipping… Is there a maximum length?

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
aaliddellcommented, Aug 10, 2017

The fix for this was made in https://github.com/nodejs/node/pull/14527 (and https://github.com/nodejs/node/pull/14571), which made it into today’s 8.3.0 release.

0reactions
aaliddellcommented, Jul 27, 2017

I just hit this issue also and it appears it is related to an issue with the node zlib module not flushing properly when you’ve written more than a single chunk’s worth of data (~16384 bytes). I’ve written this up as an issue on the node project here https://github.com/nodejs/node/issues/14523.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using server-sent events - Web APIs | MDN
When using HTTP/2, the maximum number of simultaneous HTTP streams is negotiated between the server and the client (defaults to 100). Sending ...
Read more >
Server sent events and browser limits - Stack Overflow
When using HTTP/2, the maximum number of simultaneous HTTP streams is negotiated between the server and the client (defaults to 100). Spring Boot...
Read more >
Server-Sent Events | HTML5 Doctor
In a chat app you don't send messages 60 times per second! WebSockets have advantage only if you send lots of messages continuously....
Read more >
Server-Sent Events: the alternative to WebSockets you should ...
In practice, this is unlikely to be problematic unless you're using multiple websockets per page, but the limit of 6 TCP connections is...
Read more >
Using SSE Instead Of WebSockets For Unidirectional Data ...
We transfer small amounts of JSON strings for every update as fast as ... “The EventSource interface is used to receive Server-Sent Events....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found