开发者

how to? ajax synchronize multiple browsers

What is the best way to synchronize multiple browsers? For example on the Control Website I would define 5 minutes “red.html” -> 5 m开发者_运维百科inutes “green.html” -> 5 minutes “blue.html” -> loop (back to "red.thml")

Question: How can I ensure that the content for all viewers will change simultaneously?

Technical: Local Network, Server-Side could be python or php; Every viewer on the same system time

My first Idea was: The Backend of the Control Website saves ever 10 seconds an json object with the current URL. The Viewer Website checks every 5 seconds the json object. The 5seconds should be synchronize with clock 12:01:05 -> 12:01:10 -> 12:01:15 ...

Thank You, Oli


Look into AJAX Push Engine. I personally don't have any experience with it, but it might be able to handle what you're trying to do.


You have to use long-polling ajax method to achieve this. there are no classic methods how to ensure that all users are being redirected in same time

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜