Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.