In this tutorial, we are going to learn about how to disable the autocomplete for the form input fields.
By default browser remembers the information when we submit a form by entering the data through the
<input> fields, and tries to autocomplete or autofill if we enter text again in the certain fields.
These features are enabled by default, for the user privacy reasons you need to turn it off for the input fields like credit card pin and unique government identification numbers or other fields.
To disable the autocomplete for an input field, add the
autocomplete="off" to it.
Here is an example:
<input type="text" autocomplete="off" />
You can also disable autocomplete for an entire form like this:
<form autocomplete="off"> </form>