Syncronise Server Seconds with JS Clients

Posted by imperium2335 on Stack Overflow See other posts from Stack Overflow or by imperium2335
Published on 2012-04-08T11:13:09Z Indexed on 2012/04/08 11:29 UTC
Read the original article Hit count: 153

Filed under:
|
|
|

I would like to drive a setTimeout loop based on the time of the server, seconds only.

So when the seconds on the server is 30, some function is run on all clients. It is vital that they do not become totally out of sync with the server, as there will be a CRON job running on the server every, say, 45 seconds which is important to the system functioning correctly.

It is ok if a client is out by a few seconds with the server, client do not need to be synced to each other.

I am using Jquery library.

Hope this makes sense!

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery