Making IE "forget" information entered in form when using back button.
Posted
by
typoknig
on Stack Overflow
See other posts from Stack Overflow
or by typoknig
Published on 2011-01-06T17:32:59Z
Indexed on
2011/01/09
17:53 UTC
Read the original article
Hit count: 159
I have a page with a form where many of the fields are populated from variables passed in the URL. Those fields are disabled (NON-EDITABLE) and are only there for the user to view.
The remaining fields require user input and are NOT disabled (EDITABLE). When the form is submitted a confirmation page comes up. It may be the case that the user needs to submit several of these forms where the NON-EDITABLE information is identical from form to form, so being able to go back to the form page from the confirmation page would save a lot of time.
The way I want this to work is when a user presses the back button all the NON-EDITABLE fields are populated, but the EDITABLE fields are blank. This is what Firefox is doing, but IE8 is does not "forget" what has been entered in the EDITABLE fields.
To disable the cache the following appears at the beginning of my page AND at the end of my page.
<head>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Cache-Control" content="no-store"/>
<head/>
What more must I do to make IE forget what was entered in the EDITABLE fields when the back button is pressed?
All of my pages are generated with PHP if that matters.
EDIT:
It appears to me that this is a problem of IE caching my page even though I have told it not to. Are my meta
tags correct? Do I need to do something else to prevent IE from caching my page?
© Stack Overflow or respective owner