News for hackers. Stuff that matters.
Re:Server Sent Events by Kiro on Tuesday May 16, 2023 @04:23AM (#35958995)
You don't want to clear it after only a second. It should persist much longer since people pause and think between words.

It's common that someone starts typing but immediately change their mind and clears the input after only a couple of characters. So if the timeout is longer you need an "ended" event.

Re:Server Sent Events by bongobingo1 on Tuesday May 16, 2023 @10:42AM (#35962558)
(the "ended" event is the message being sent.)
Re:Server Sent Events by yencabulator on Wednesday May 17, 2023 @02:54PM (#35979617)
Except for the scenario the parent is talking about:

> It's common that someone starts typing but immediately change their mind and clears the input after only a couple of characters.