I would read through the specifications on the
autocomplete
attribute from various credible sources.
According to w3schools, the only valid values are
on or
off
HTML input autocomplete Attribute[
^]
According to MDN (Mozilla Deliver Network, the makers of FireFox), there is a variety of values that can be used in there; however what happens in other browsers is not guaranteed
The HTML autocomplete attribute - HTML: Hypertext Markup Language | MDN[
^]
NOTE:
The autocomplete attribute also controls whether Firefox will — unlike other browsers — persist the dynamic disabled state and (if applicable) dynamic checkedness of an <<input> element, <textarea> element, or entire <form> across page loads. The persistence feature is enabled by default. Setting the value of the autocomplete attribute to off disables this feature. This works even when the autocomplete attribute would normally not apply by virtue of its type.
Now if we go to W3C (World Web Consortium), the actual standards organization; they do not have listed out actual values. What they do have which may be helpful is how the DOM has it represented:
attribute boolean autocomplete
, and boolean generally is accepted as a true or false.
HTML5 Reference[
^]
In Summary
There are standards that can be followed and you can hope that the browser honors what you have requested. But, as evidenced by the MDN link above; browsers may extend that functionality so you never know what they do or do not support. Nevermind that many people have extensions added onto their browsers that can further interfere or augment this.
An observation
One of the heavily secured websites I sign into is using
Angular Material UI
design components, and they have leveraged those components quite nicely to NOT save or fill in login credentials.
You may want to browse through their write-up and code to see if this can help you out.
Angular Material UI : Autocomplete overview[
^]