Play with this code

Storage

The browser can remember things between visits. This example uses localStorage to save the time of your last click, even after you close and reopen the page.

Save Time on Click

Saves a timestamp to localStorage, then counts up from it every second — even across page reloads.