I do not think this is only possible with html, some programming needs to be added.
You may have a js function called in the onload event of the document.
Function
may be like this:
function resetfields() { $("input[type=text]").val(""); $("textarea").val("");
And you can also use some ajax in this function to get new code every time.
you can put this function on your master / header page so that you do not need to copy it to all pages (for this you may need to make the selector more accurate).
source share