Link to "Version 3.0 clock"
Re: Link to "Version 3.0 clock"
08-20-2009 1:23 PM
poolie
Top 10 Contributor
Joined on 08-20-2009
Posts 45
Version 3.0 clock
Reply Contact
After logging on the website and browsing around for a bit, the clock goes haywire.
does anyone else have this problem
?
08-20-2009 2:02 PM In reply to
mikehall
Top 10 Contributor
Joined on 08-09-2009
Chandler, AZ
Posts 303
Re: Version 3.0 clock
Reply Contact
If you're seeing that when you hit the browser Forward and Back buttons, it's normal. There's javascript code that runs in the background whenever you relaod the page to pull the current time off the server. So you may an old time up there for a second or two, then it will jump to the current time. If your web server is running slow, there will be a longer delay before it syncs up.
If you're seeing something else, let me know.
08-20-2009 5:41 PM In reply to
poolie
Top 10 Contributor
Joined on 08-20-2009
Posts 45
Re: Version 3.0 clock
Reply Contact
Looking more into this issue, I notice the problem only exist with the Internet Explorer model browser. My firefox works as design.
When I login using the IE browser the clock is good. I click on a entry form and enter my entries for a few minutes. When I click submit and the results load the page has the correct time, then it subtracts a few minutes. I dont understand why it subtracts time. I only worry about users abusing this; or complaing about it when the season starts?
08-20-2009 6:30 PM In reply to
mikehall
Top 10 Contributor
Joined on 08-09-2009
Chandler, AZ
Posts 303
Re: Version 3.0 clock
Reply Contact
It's always IE, isn't it? I'll see what I can do about it but in the meantime,you don't have to worry about it being abused.
The code on the server gets the current time from the server's clock before it updates any entries. As long as your server has the right time, it won't let anyone cheat.
08-21-2009 5:26 AM In reply to
poolie
Top 10 Contributor
Joined on 08-20-2009
Posts 45
Re: Version 3.0 clock
Reply Contact
You're right! It is always IE. Its a shame its preloaded on every PC.
09-07-2009 7:36 AM In reply to
Smokey Jones
Top 10 Contributor
Joined on 08-24-2009
Posts 47
Re: Version 3.0 clock
Reply Contact
Mike, have you come up with any solution for this? What I'm seeing is that if I stay on my pool's pages for awhile, the clock doesn't update the minutes.
09-08-2009 7:59 AM In reply to
mikehall
Top 10 Contributor
Joined on 08-09-2009
Chandler, AZ
Posts 303
Re: Version 3.0 clock
Reply Contact
I haven't been able to reproduce this, but you can try this. In the scripts/common.js file, look for this line near the top (line 45)
setInterval(update, 500);
That sets the clock to update every 500 milliseconds, or half a second. Try changing that to 1000 (once per second). I may just be trying to update too often and getting out of sync.
09-09-2009 4:50 AM In reply to
poolie
Top 10 Contributor
Joined on 08-20-2009
Posts 45
Re: Version 3.0 clock
Reply Contact
I tried setting the value to 1000 and even 2000. you can see there is a sec or two that goes by before it resyncs but it then resync with the cookie's time.
To recreate this action:
In a clean IE8 browser, navigate to your site. note the initial time in the top right. You will notice it matches the time of the cookie.
Wait 10 seconds and refresh or naviagte to another page. You will notice it will load the correct servers time, but a half a sec later, or a sec later if you have the interval set to 1000, it will subtract some time and display the initial cookie time....and start ticking up....
09-09-2009 9:29 AM In reply to
mikehall
Top 10 Contributor
Joined on 08-09-2009
Chandler, AZ
Posts 303
Re: Version 3.0 clock
Reply Contact
It may be a caching issue. The code is set up to make an AJAX call on page load to fetch the current time from getEasternTime.asp . It sounds like IE may be caching that, so it gets an old time value.
In the scripts/common.js file, you can change this:
// Get the current Eastern time from the server. Once retrieved, start
// updating the display.
var xhr = new XHR();
xhr.url = "getEasternTime.asp";
xhr.successCallback = function(reqObj) {
to this:
// Get the current Eastern time from the server. Once retrieved, start
// updating the display.
var xhr = new XHR();
xhr.url = "getEasternTime.asp?random=" + Math.floor(Math.random() * 10000000);
xhr.successCallback = function(reqObj) {
That should force IE to make the request instead of pulling it from cache.
09-09-2009 1:03 PM In reply to
poolie
Top 10 Contributor
Joined on 08-20-2009
Posts 45
Re: Version 3.0 clock FIXED!
Reply Contact
Thanks Mike. I would of never of thought of that... I set it as you suggested above and it is working perfect now.
09-09-2009 7:03 PM In reply to
Smokey Jones
Top 10 Contributor
Joined on 08-24-2009
Posts 47
Re: Version 3.0 clock FIXED!
Reply Contact
Thanks Mike! That appears to have fixed it for me, too! Beer
09-09-2009 8:59 PM In reply to
mikehall
Top 10 Contributor
Joined on 08-09-2009
Chandler, AZ
Posts 303
Re: Version 3.0 clock FIXED!
Reply Contact
Good to hear, I've updated the download if anyone wants to just grab the updated file instead of manually editing it.
Page 1 of 1 (12 items)
poolie
Top 10 Contributor
Joined on 08-20-2009
Posts 45
Version 3.0 clock
Reply Contact
After logging on the website and browsing around for a bit, the clock goes haywire.
does anyone else have this problem
?
08-20-2009 2:02 PM In reply to
mikehall
Top 10 Contributor
Joined on 08-09-2009
Chandler, AZ
Posts 303
Re: Version 3.0 clock
Reply Contact
If you're seeing that when you hit the browser Forward and Back buttons, it's normal. There's javascript code that runs in the background whenever you relaod the page to pull the current time off the server. So you may an old time up there for a second or two, then it will jump to the current time. If your web server is running slow, there will be a longer delay before it syncs up.
If you're seeing something else, let me know.
08-20-2009 5:41 PM In reply to
poolie
Top 10 Contributor
Joined on 08-20-2009
Posts 45
Re: Version 3.0 clock
Reply Contact
Looking more into this issue, I notice the problem only exist with the Internet Explorer model browser. My firefox works as design.
When I login using the IE browser the clock is good. I click on a entry form and enter my entries for a few minutes. When I click submit and the results load the page has the correct time, then it subtracts a few minutes. I dont understand why it subtracts time. I only worry about users abusing this; or complaing about it when the season starts?
08-20-2009 6:30 PM In reply to
mikehall
Top 10 Contributor
Joined on 08-09-2009
Chandler, AZ
Posts 303
Re: Version 3.0 clock
Reply Contact
It's always IE, isn't it? I'll see what I can do about it but in the meantime,you don't have to worry about it being abused.
The code on the server gets the current time from the server's clock before it updates any entries. As long as your server has the right time, it won't let anyone cheat.
08-21-2009 5:26 AM In reply to
poolie
Top 10 Contributor
Joined on 08-20-2009
Posts 45
Re: Version 3.0 clock
Reply Contact
You're right! It is always IE. Its a shame its preloaded on every PC.
09-07-2009 7:36 AM In reply to
Smokey Jones
Top 10 Contributor
Joined on 08-24-2009
Posts 47
Re: Version 3.0 clock
Reply Contact
Mike, have you come up with any solution for this? What I'm seeing is that if I stay on my pool's pages for awhile, the clock doesn't update the minutes.
09-08-2009 7:59 AM In reply to
mikehall
Top 10 Contributor
Joined on 08-09-2009
Chandler, AZ
Posts 303
Re: Version 3.0 clock
Reply Contact
I haven't been able to reproduce this, but you can try this. In the scripts/common.js file, look for this line near the top (line 45)
setInterval(update, 500);
That sets the clock to update every 500 milliseconds, or half a second. Try changing that to 1000 (once per second). I may just be trying to update too often and getting out of sync.
09-09-2009 4:50 AM In reply to
poolie
Top 10 Contributor
Joined on 08-20-2009
Posts 45
Re: Version 3.0 clock
Reply Contact
I tried setting the value to 1000 and even 2000. you can see there is a sec or two that goes by before it resyncs but it then resync with the cookie's time.
To recreate this action:
In a clean IE8 browser, navigate to your site. note the initial time in the top right. You will notice it matches the time of the cookie.
Wait 10 seconds and refresh or naviagte to another page. You will notice it will load the correct servers time, but a half a sec later, or a sec later if you have the interval set to 1000, it will subtract some time and display the initial cookie time....and start ticking up....
09-09-2009 9:29 AM In reply to
mikehall
Top 10 Contributor
Joined on 08-09-2009
Chandler, AZ
Posts 303
Re: Version 3.0 clock
Reply Contact
It may be a caching issue. The code is set up to make an AJAX call on page load to fetch the current time from getEasternTime.asp . It sounds like IE may be caching that, so it gets an old time value.
In the scripts/common.js file, you can change this:
// Get the current Eastern time from the server. Once retrieved, start
// updating the display.
var xhr = new XHR();
xhr.url = "getEasternTime.asp";
xhr.successCallback = function(reqObj) {
to this:
// Get the current Eastern time from the server. Once retrieved, start
// updating the display.
var xhr = new XHR();
xhr.url = "getEasternTime.asp?random=" + Math.floor(Math.random() * 10000000);
xhr.successCallback = function(reqObj) {
That should force IE to make the request instead of pulling it from cache.
09-09-2009 1:03 PM In reply to
poolie
Top 10 Contributor
Joined on 08-20-2009
Posts 45
Re: Version 3.0 clock FIXED!
Reply Contact
Thanks Mike. I would of never of thought of that... I set it as you suggested above and it is working perfect now.
09-09-2009 7:03 PM In reply to
Smokey Jones
Top 10 Contributor
Joined on 08-24-2009
Posts 47
Re: Version 3.0 clock FIXED!
Reply Contact
Thanks Mike! That appears to have fixed it for me, too! Beer
09-09-2009 8:59 PM In reply to
mikehall
Top 10 Contributor
Joined on 08-09-2009
Chandler, AZ
Posts 303
Re: Version 3.0 clock FIXED!
Reply Contact
Good to hear, I've updated the download if anyone wants to just grab the updated file instead of manually editing it.
Page 1 of 1 (12 items)