IE7 doesn't retain form input when back button is used?

2

I recall IE having the ability to repopulate or maintain the form fields when the back button is used.

For example I have a form with two fields.

<form action="some/page" method="get">
   First Name: <input type="text" name="fName" /><br/>
   Last Name: <input type="text" name="lName" /><br/>
   <input type="Submit" />
</form>

The user submits the form, doesn't get the results they want, so uses the back button, but wants the input to remain. Is this functionality that IE provides or must I write code for it?

C. Ross

Posted 2011-04-11T13:00:32.580

Reputation: 5 284

Answers

1

If your cache is full, going back to the page may wipe out the form data.

You can also check if the page is using cache control to help not clear the data on page processing.

header("Cache-control: private"); 

You can try to mitigate both if the code of the page keeps things in sessions so that if the user does go back you can pre-populate with whatever they entered.

random

Posted 2011-04-11T13:00:32.580

Reputation: 13 363