A
A
Alexander Afanasiev2017-11-07 11:46:38
JavaScript
Alexander Afanasiev, 2017-11-07 11:46:38

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

8 answer(s)
A
Anton Spirin, 2019-08-13
@rockon404

1. Add a line break to the source line after the dot.
2. Style code:

.formWrap__logo_tit {
  white-space: pre-line;
}

N
Nikita Kolesnikov, 2019-08-13
@NikitOS_MV

<div class='test'>
Привет. Как дела?
</div>

var test = $('.test').text();
var result = test.replace(/\./g,'.<br/>');   

$('.test').html(result);

Result:
Hello.
How are you?

R
RALMAZ, 2017-11-07
@XanderEVG

Socket.io

V
Viktor, 2017-11-07
@Levhav

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.

M
myxasa, 2017-11-07
@myxasa

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

W
whiteleaf, 2017-11-08
@whiteleaf

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.

S
Stanislav Makarov, 2017-11-08
@Nipheris

> 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.

A
Alexey, 2017-11-16
@Demanoidos

Maybe before Christmas. But if you are making a product for a corporate party, then be prepared for Windows XP, old IE and no chrome / firefox. It's sad, but that's life.
And the percentage of such workstations is very high. Still.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question