搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

Learn More

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.

more options

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.

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.

所有回复 (2)

more options

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.

more options

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