I am having problems with form fields retaining values when the user
hits the back button. This occurs with standard pure html forms, like:
Title:
If the user fills in the text field and submits, or browses to another
page, when they hit the back button the form is blank.
I only get the error when using IE and the page is being served with
Webrick.
Does anyone have any ideas what might cause this?
Thanks for any advice/tips…
Well I figured it out.
It was caused by the no-cache header rails automatically adds.
Safari and Firexo correctly handle it. IE 6 decides to save the
original state of the form and ignore any user input. Great. Another
bunch of hours wasted.
BTW - both of the following work in IE 6
@response.headers[‘Cache-Control’] = ’ ’
@response.headers[‘Cache-Control’] = ‘private’
Of course, on the private one turns off caching.
Stop the madness…
Desert P. wrote:
I am having problems with form fields retaining values when the user
hits the back button. This occurs with standard pure html forms, like:
Title:
If the user fills in the text field and submits, or browses to another
page, when they hit the back button the form is blank.
I only get the error when using IE and the page is being served with
Webrick.
Does anyone have any ideas what might cause this?
Thanks for any advice/tips…