Replaced JavaScript timer with ajax timer