Answer the question
In order to leave comments, you need to log in
How to make a time left counter with time from the server?
Does anyone have an example of the remaining time counter, which works in real time on the page, but which time takes from the server? JS, as I understand it, cannot do this, but with PHP the counter will be static.
Answer the question
In order to leave comments, you need to log in
You can request data every second with ajax, but this is a big nonsense. I would get the time from the server from the very beginning, and then subtract one every second using pure JS
There is no need for AJAX at all. You take the starting countdown time from the server and that's it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question