by toolate · 16y ago · 0 comments
You could even incorporate the timer into a single request.
do {
sleep(1);
$seconds_remaining = fetch_auction_time_from_memcache();
echo "<script>updateActionTime($seconds_remaining);</script>";
flush();
} while ($seconds_remaining > 0);Longer running connections are a little more problematic, but some client side code should be able to handle the connection being closed. You just need to make sure your web server can handle the number of connections your are expecting. Apache is particularly bad for this. Something like nginx should perform better.