what to do in order to make the form remember the previous input or the current input of the user even after he/she refreshed the page ?
should I do ,
That quite depends on where the data in the fields is coming from. If your scenario is that you are presenting a blank form, the user enters some data and then without submitting it, refreshes the page, there is nothing you can do. That's up for the browser to handle.
You might be able to do some very weird JavaScript hacking there, but I would not suggest that.
On the other hand, if your data is coming from a previous page or something like that, that's a different story. But then you need to tell us where the data is coming from, so I can give you a reasonable answer.