# More Back Button Madness

**URL:** <https://www.ruby-forum.com/t/more-back-button-madness/93107>\
**Category:** Rails\
**Created:** [April 27, 2007, 5:19pm UTC](https://www.ruby-forum.com/t/more-back-button-madness/93107 "2007-04-27T17:19:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![desertpenguin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/d07c76/32.png) [@desertpenguin](https://www.ruby-forum.com/u/desertpenguin)\
**Post date:** [April 27, 2007, 5:19pm UTC](https://www.ruby-forum.com/t/more-back-button-madness/93107/1 "2007-04-27T17:19:44Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![desertpenguin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/d07c76/32.png) [@desertpenguin](https://www.ruby-forum.com/u/desertpenguin)\
**Post date:** [April 27, 2007, 5:53pm UTC](https://www.ruby-forum.com/t/more-back-button-madness/93107/2 "2007-04-27T17:53:40Z")

</div>

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…
