|
-
October 20th, 2008, 07:49 AM
#5
Re: Server Time Count Down Clock
 Originally Posted by PeejAvery
JavaScript cannot access the server-side. And, since the OP wants the time from the server, there is going to have to be some implementation from the server.
Agreed, I was going the same way as your post where the server pushed down the current time with the initial page and the client did the updating.
Note that in addition to "Drift", this type of approach is difficult (and not covered in your sample) if the time zone (or day light savings time) changes while the counddown is in progress.
The "DIFFICULTY" I was referring to earlier is common in cryptography type (time variant keys) where the timing must be synhronized (typically on the order of sub-milliseconds) including all network and processing latency.
Imagine how hard it would be to have a system where a page was supposed to chage exactly at 03:00 GMT on a given date. Every browser must display the new page at exactly the same time (+/- 1mS) regardless of where in the world they are, or what their networking connection is, or what their hardware capabilities are...
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|