What is the most effective method to synchronize the time displayed on a webpage with the server?
My webpage requires that a countdown begins simultaneously for all users and ends at precisely the same time to avoid any user gaining a time advantage.
While a similar question has been asked before, the accepted answer only partially addresses my concerns: how-to-sync-a-javascript-countdown-with-server-time
I currently utilize Ajax post-page load to retrieve the server time, but can it be ensured that the countdown will end at exactly the same time for all users with a margin of error of under 15 minutes?
Even if the timers accurately track the time, there may still be a slight discrepancy of under 1 second between client pages due to disregarding milliseconds in the setInterval function - is there a solution to overcome this issue?