Browser back button restores empty fields

后端 未结 6 1420
小鲜肉
小鲜肉 2020-12-05 09:02

I have a web page x.php (in a password protected area of my web site) which has a form and a button which uses the POST method to send the form dat

6条回答
  •  南方客
    南方客 (楼主)
    2020-12-05 09:40

    Firefox does this kind of caching. As I understand your question, you want IE7 to behave the way Firefox does. I think that's not possible.

    Firefox and IE7 differ on the way they interpret the back button.

    Firefox will display the DOM tree of the previous page as it was last displayed before the page was left. That is, all the form data will still be contained in the form's input field. But you won't see an onload event upon hitting the back button.

    IE7 will render the page again based upon the response it receives from the server. Thus the form is emtpy (unless there were default values sent by the server originally), but you'll see an onload event.

提交回复
热议问题