Mozilla Official documentation recommendations
Mozilla Developer documentation recommends using the form settings property tautocomplete= "Off" to prevent the browser from fetching data from the cache to populate the login form.
type="text" name="foo" autocomplete="off" />
But this option is not compatible with some chrome, Firefox.
Compatible with all browsers
The final decision is to use hidden input to accept the browser AutoFill, which will not affect the user experience or be compatible with all browsers.
<input style="display:none"><!-- for disable autocomplete on chrome --> <input type="text" id="username" name="username" autocomplete="off">
But it doesn't really work on chrome, and you can only block the user name AutoFill on Firefox.
and then we searched and found a new thing.
type="password" autocomplete="new-password">
Turn Password's AutoComplete property from off to New-password and find that chrome isn't automatically populated, but the user name is still populated on Firefox
Then combined with the 1th attempt, the final result is to use the following method
type="password" style="display: none;"/> <input type="text" autocomplete="off"/> <input class="form-control" type="password" name="tradePassword" id="txPassword" autocomplete="new-password"
This will not be populated on Chrome or Firefox.
HTML Input Organization Auto-complete