When I code <script>window.history.back();</script> on a page due to a data validation problem, all browsers except Firefox redisplay the filled-out form page.
When I use javascript "window.history.back()" because a user enter invalid text, Firefox returns to the page with the form on it but it clears out the form. All the other browsers go back to the previous page with the form filled out as it was when submit was entered.
Firefox did not used to do this. I do not change browser settings from default to get this unfortunate behavior. This may mean Firefox is more secure, but only on a public computer. On a private computer, this sucks.
All Replies (2)
See if this helps you. https://developer.mozilla.org/en-US/docs/Web/API/Window.history
If not, try posting at the Web Development / Standards Evangelism forum at mozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox.
http://forums.mozillazine.org/viewforum.php?f=25
You'll need to register and login to be able to post in that forum.
Do you allow caching of the form page? Firefox usually will go back to a cached page and show it just like it was. This article covers some of the scenarios for pages being and not being cached: https://developer.mozilla.org/en-US/docs/Using_Firefox_1.5_caching