How to remove browser suggestion for textbox ?

The autocomplete attribute

The autocomplete attribute used in html is to predict the value filled previously. The attribute autocomplete=”on | off” helps to fill the previously typed value in the input field. The autocomplete attribute works for input field with type name, email, url, password etc.

The autocomplete attribute supports in almost all browsers like Chrome, Firefox,Internet explorer / Edge, Safari, Opera etc.

Sometimes your browser remembers what you previously filled into an input field and if you click on an empty field, you get suggestions in a drop-down menu. In addition, if you use this suggestion to fill into the input field, the background of that field will turn light-blue in the chrome browser, until you edit the text or exit the form.

For fixing this issue you can use attribute autocomplete=”off” or autocomplete=”false”. This can be used as autocomplete=”new-fieldName” where fieldName is your input name.

For example: <input name=”password” type=”password” /> then autocomplete=”new-password”.
This will result to:
<input name=”password” type=”password” autocomplete=”new-password” />