Z
Z
zangri2014-08-24 16:57:45
JavaScript
zangri, 2014-08-24 16:57:45

How to correctly generate an html page that is updated in real time?

I've created 7 (for example) chat rooms in the database and I'm displaying statistics (how many users are online and etc) every 100ms about these rooms on a div element. The problem is that the div is updated at such a speed that links are very slow (from the 10th click) to work in it.

Tell me the solution so that you can enter the room correctly and the statistics are real-time.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evgeny Petrov, 2014-08-24
@zangri

See
" WebSockets - The Complete Asynchronous Web "
" Bidirectional Asynchronous Communication in the Web... "

V
Viktor, 2014-10-19
@Levhav

Use WebSockets, but to work with it so that the server does not go down even if there is not much traffic, you will need a comet server. It may be advisable to use a comet server represented by the saas model, this will greatly speed up and simplify your project writing and all the load will fall on your servers.
[Ru] comet-server.ru
[En] pusher.com

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question