H
H
Httdientee2021-06-13 15:43:20
PHP
Httdientee, 2021-06-13 15:43:20

How to make a countdown regardless of whether the page is open?

The task is this, it is necessary to implement a script for counting time by event, while this all works without a necessarily open page.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mletov, 2021-06-13
@mletov

Depends on what is considered an event.
You can, for example, write the date time of the event to the database and at the right time consider the difference as an SQL query.
You can set a cookie or localStorage with a datetime to the client, you can use web sockets
In short, a lot of things are possible, but only if you formulate the problem normally;)
Give a real example of how it should work

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question