Firefox keeps form data on reload

后端 未结 8 2078
忘掉有多难
忘掉有多难 2020-12-02 14:59

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

相关标签:
8条回答
  • 2020-12-02 15:58

    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>
    
    0 讨论(0)
  • 2020-12-02 16:02

    I think easier and quicker way to do that is

    $('input,textarea').attr('autocomplete', 'off');
    
    0 讨论(0)
提交回复
热议问题