#how to get previous data continuously

20 messages · Page 1 of 1 (latest)

stoic stratus
vale widget
stoic stratus
#

@vale widget thanks for reply

#

but it works on same browser

#

like i change browser and session ended its starts from 0

vale widget
#

Of course

#

Client data is not shared between browsers, that would be awful

#

If you want to persist data for a same IP, you need a server

stoic stratus
#

@vale widget i have server

#

lack of knowledge ?

#

how to do it

vale widget
#

You can save the timer alongside the ip on your server, whether on the file system or in a database

stoic stratus
#

Then from where i need to fetch i think

grand stream
#

Use local storage to save the start time. On page load, check if local storage has a start time saved. If it does, start count down based on difference between current time and start time. If there is no saved value, start count down from current time and save current time in local storage.

#

You might need to add some kind of maximum duration or manual clearing function if you do this. Otherwise, someone who uses this counter a second time several days later will still have it resume from the previous session.

stoic stratus
#

@grand stream but local stroage doest't work for me

#

I'm trying to build like this

grand stream
vale widget
#

If you have a server just send a request to it. Browsers have fetch natively