HTML form values and 'Back' button

前端 未结 2 1929
借酒劲吻你
借酒劲吻你 2021-01-13 19:55

How can one retain HTML form info when hitting the back button? Is this a default HTML or Browser behavior? Or is it Browser dependent?

2条回答
  •  萌比男神i
    2021-01-13 20:17

    It is default browser behavior, but ONLY if the page containing the form is cache-able, e.g. has headers set such that the browser is allowed to cache it.

    How does SO's form remember previous input values?

提交回复
热议问题