4 ms·
On the server? As an example of equivalent (to the k and q versions) code. On the client? Because endlessly refreshing the page to refresh chat messages is an
by vidarh 4y ago
On the server? As an example of equivalent (to the k and q versions) code.
On the client? Because endlessly refreshing the page to refresh chat messages is an awful design that we had enough of already in the 90's.
- HotGarbage 4y agoCould be done with long polling or a never-closing HTTP response. POST to an iframe to keep the page from reloading on send.
- deleted 4y ago[deleted]
- vidarh 4y agoThat's true, and those options are also awful options we used in the 90's and promptly abandoned once better options became available, though they wouldn't make that much difference here. The alternatives are all brittle and limited in different ways.
- IshKebab 4y agoWell sort of. Server Sent Events is basically "official long polling" and it works very well. Way simpler than websockets in many cases. Websockets is obviously better here though.
- vidarh 4y agoThe point isn't that the way the data is sent from the server matters much, but that using javascript to handle the retrieval is beneficial. The first Javascript enabled chats still relied on the same methods of retrieval for a long time, but still significantly improved usability.