Answer the question
In order to leave comments, you need to log in
What technologies to use to create a chat?
Hello. I want to create a website in which info from different users is displayed to clients in real time. some kind of chat. What modern technologies should be used? I found an article on Habré from 2010:
1) Polling, Long poll - a lot of traffic
2) "endless" iframe. хзхз
3) HTML5 WebSockets - there may be problems with old browsers
I'm doing it for myself, but there can be about 200 users, and from the older generation, so old versions of browsers are expected. What can you advise?
Answer the question
In order to leave comments, you need to log in
1. Add a line break to the source line after the dot.
2. Style code:
.formWrap__logo_tit {
white-space: pre-line;
}
<div class='test'>
Привет. Как дела?
</div>
var test = $('.test').text();
var result = test.replace(/\./g,'.<br/>');
$('.test').html(result);
Support for websockets is so wide ( 94% ) that the rest of the methods are already outdated and I think they may be needed if you want to support absolutely junk. Which even major social networks do not support.
https://sendbird.com
https://www.messagebird.com
https://www.twilio.com/
https://voximplant.ru/
it is
not necessary to rivet your own,
you can use a third-party service - everything has already been done ten times a long time ago
And if you make a bundle using: Node.js - backend, angularjs - frontent, socket.oi, mongodb.
Like under all browsers and works quickly. Can support many concurrent requests.
> I found an article on Habré from 2010:
> HTML5 WebSockets - there may be problems with old browsers
in 2010 by the standards of the frontend, this is before the birth of Christ. You need to look for up-to-date information, pure web sockets or solutions based on them are more than enough.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question