How to clear form data when user navigate back after submit in hTML form?

Hi there

This is my HTML form code

<html>
<head>
<title>Form demo</title>
</head>
<body>
<form method="post" action="#">
 <input type="text" name="userfirst"/>
<input type="text" name="usersecond"/>
<input type="submit" value="submit"/>
 </form>
</body>
</html>

what i want when I click on submit button then all value will be send action match.But when user navigate back then values are still on that input box.I want when user navigate back then those value should be clear.

How could I achieve this?
thanks

I see two solutions,

  1. Prevent page from caching (with response headers from server);
  2. Clear all fields each time page is loaded with Javascript.

Example with jQuery:

<script>
    $(document).ready(function(){
        $('form input:text').val('');
    });
</script>

This trick is awesome Thanks

Discussion continued at