Detect if Chrome restores the page from yesterday

I have a form with an date input field. If you load the page the input is filled with the current date. But if Chrome starts and restores the last opened tabs from yesterday, there is always the date from yesterday in the form. If I reload the page it shows the correct date. But I would like Chrome to show the current date right away.

Any clever idea how to fix this?

Update: Page is set to cache-control:no-cache, private.

1 answer

  • answered 2017-12-11 09:35 Cunha

    You can either use ajax or get the server date.