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

Hi there

This is my HTML form code

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

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?

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:

        $('form input:text').val('');

This trick is awesome Thanks

Discussion continued at