Forum Moderators: open

Message Too Old, No Replies

Form data disappears when hitting back button

         

dualfragment

4:54 pm on Oct 28, 2005 (gmt 0)

10+ Year Member



I use PHP, and I have tried the header("Cache-control: private"); at the very start, but it doesn't seem to make a difference in Firefox browser. The form data disappears if a user previews something and tries to go back to fix a change.

How do I fix this? It would suck for a user to lose all their data they type in, as this is a blog type website for a specific niche.

chriswragg

9:26 am on Oct 29, 2005 (gmt 0)

10+ Year Member



I find that in Firefox, all data stays in a form when the page is refreshed or the back button pressed as long as the form name, and the field names stay the same.

Also if you have a value="" attribute in your text box input tag, then the field will default to being blank.

Hope this helps
Chris

kaled

11:55 am on Oct 29, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If this is somehow connected to http headers, you should be able to locate the source of the problem by comparing the headers of a page that works as you expect with the headers of your own page.

Kaled.