How to sync two browsers

I have a little problem, and since my WEB development skills are not the sharpest, I hope you can help me.

The problem is that I am working on a SCRUM digital taskbar, and one of the main functions will be that browsers that have the same open taskbar will have to show the same image. Thus, if person A moves the task, person B should see this in his browser without having to manually refresh the web page.

I know that before a millisecond synchronization is impossible, because it would just kill the network connection. But once every 30 seconds it would be good. Except when you can click messages.

The representation of moving an element is not an issue, because I can make it blink quite easily. I need help on the browser server server . As a person’s browser, B knows that something has changed. Is it really as simple as having a timer and idioticly requesting a JSON service for any changes. Or is there a way to make changes to the browser?

+3
source share
5 answers

You want to see Comet .

In web development, Comet is a neologism for describing a network application model in which an HTTP request allows a web server to transfer data to a browser, without the browser explicitly requesting it.

, . JavasScript , , , , .. Dojo - , , .

+10

:

  • : ajax x
  • : ajax , ,
  • flash-: -
+4

, , .

, , , , , .

. .

0

, . , , JavaScript (setInterval (function, timeInMs)) script, AJAX, .

0

, AJAX - A , , XMLHttpRequest , , , .

"" .

-1

Source: https://habr.com/ru/post/1718799/


All Articles