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?
相关问题
- Laravel Option Select - Default Issue
- HTML form is not sending $_POST values
- How to use Control.FromHandle?
- Xamarin. The name 'authorEntry does not exist
- HTML <form> tag causing Rails form to submit
相关文章
- Firefox remembering radio buttons incorrectly
- Show a different value from an input that what wil
- Is there a google API to read cached content? [clo
- How can I detect/watch “dirty-status” of an angula
- Why form submit opens new window/tab?
- CSS Firefox box-shadow and outline
- AWS API Gateway caching ignores query parameters
- Setting Angular 2 FormArray value in ReactiveForm?
Instead of going through all inputs you may also just add the attribute to your form-element like so:
<form method="post" autocomplete="off">...</form>
However the above mentioned methods on domReady did not work for me...
I think easier and quicker way to do that is
Just add
autocomplete="off"
to all you input and you will solve the problem.jQuery to solve this on all inputs and textareas
I found the only fix for me was to do
before doc ready early in the page, as suggested in the comment by @Marek above - not great but worked for me (the autocomplete attribute method via either jQuery, JS or HTML didn't in the end fix it for me)
I tried the shortened solution above, but it didn't clear the value of the select boxes on my page.
I ended up modifying it slightly and now all input types on the page are cleared regardless of type:
So to make this run onload I just put it in the ready() method:
Call this function onload.