You need to find a mechanism to set the Cache-Control
parameters on the pages you serve.
You do not indicate how you are serving web pages. But, here is an example of an ASP page that
causes the form content to disappear when returning to a page using the back button (this is
the behaviour you are currently experiencing):
<% Response.CacheControl = "no-cache" %>
<% Response.AddHeader "Pragma", "no-cache" %>
<% Response.Expires = -1 %>
<HTML>
<HEAD>
<TITLE>Test page</TITLE>
</HEAD>
<BODY>
Type some text into this box, click SO followed by the BACK button:
<input type="text" name="title" value="" />
<a href="http://www.stackoverflow.com">SO</a>
<p>
When you get back the text you typed will be gone.
</BODY>
</HTML>
Note the top 3 lines, make a couple of minor modifications...
<% Response.CacheControl = "private" %>
<HTML>
<HEAD>
<TITLE>Test page</TITLE>
</HEAD>
<BODY>
Type some text into this box, click SO followed by the BACK button:
<input type="text" name="title" value="" />
<a href="http://www.stackoverflow.com">SO</a>
<p>
When you get back the text you typed will still be there
</BODY>
</HTML>
Now the input field content is preserved.
This is the behaviour you are trying to achieve. There
may be additional parameters you need to set too depending on your specific
needs and the defaults applied by your server.
Further details for Cache-Control are available at:
Cache Control in ASP. As with most things Microsoft, it only
discusses IE.
This tutorial on Caching provides a good introduction with example code for several different web servers, including PHP.
w3.org is the reference you
really need to study, particularly section 14.9 on Cache-Control.
The key to getting the
behaviour you are looking for is in serving pages with the correct cache control parameterization.