Countdown timers - potential changes

Discussions about the Enuuk Platform in general - both the GPL and Commercial versions
Post Reply
Site Admin
Posts: 750
Joined: Fri Jan 08, 2010 2:23 am
Location: Stoke-on-Trent

Countdown timers - potential changes

Post by RWAP » Wed Oct 16, 2013 6:59 pm

Sorry for those who have to update their enuuk files by hand, but I may have caused quite a big change to the main Enuuk platform - they were going to do some testing on it this week and see whether they needed to incorporate it in the main code.

Basically, I have noticed that if you open the same listing in several tabs in the browser, due to the time taken to render the page (from when the server starts working out what to show), you could actually see a different amount of time remaining - up to 2 seconds in my worst case scenario!!

This appears to be down to the fact that when the page is rendered, the countdown timer is told how many seconds remain on the listing and works it out from there. The problem is that that number of seconds is only valid at the point when the data is fetched from the database, and before PHP starts working on the code, you receiving the information via the internet and your browser rendering it and firing off the jQuery Countdown.

jQuery countdown allows for a different approach - whereby you tell it the date and time that is is to count down to. It can then execute an Ajax query back to the server to quickly check the actual server time, and synchronise the two clocks (ie the javascript clock running on your PC and the clock running on your server).

I have implemented this already on a couple of websites and it seems to prevent issues - particularly when people try to bid in the last second of the auction...

Unfortunately, it does mean changes to pretty much all the templates to ensure that the right data is used to start up the countdown timer...

In my opinion, this is a much needed change...

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest