Firefox keeps form data on reload

2019-01-10 20:29发布

I have a big problem with the functionality in Firefox that keeps data that the user have filled in on reload F5. If i use Ctrl+F5 the forms are cleared and this is great. My problem is that not all my users know that this is what they have to do to force the input cleanup. Is there a way in the html or response headers to tell Firefox to not keep the data in the forms?

7条回答
淡お忘
2楼-- · 2019-01-10 20:55

In case you want to keep the autocomplete feature of the browser (see other valid answers), try adding the name attribute to the form and give it a random value. It has worked for me:

<form id="my-form" name="<random-hash>">
...
</form>
查看更多
登录 后发表回答