How to properly handle page refresh?
The best way, when you load the page, you should check it if there was any content for each form field already saved in db otherwise try some client side form field cache technique.
I have a form on my page with many fields. I save field values in the datastore once user input a value (without waiting for form submission). Some score is calculated based on field values and displayed to the user. I also generate user's client id and store that in user's cookies for one hour.
I am not sure what should happen when user refreshed the page in browser:

if user pressed F5 in FF, then field values are still displayed in the browser;
when user pressed Ctrl+F5, then values are cleared.

In both cases I don't want to create new record for this user, so client id should remain the same. But in scenario (1) I should NOT clear field values in datastore and its score, but I should do it in scenario (2). How can I recognize that on the server side?