3 ms·
The HTML autocomplete attribute
- chrismorgan 6y agoRecently discussed, a browser extension filling the credit card expiry year in an unrelated field: https://news.ycombinator.com/item?id=26549307 https://news.ycombinator.com/item?id=26549307 This autocomplete attribute is a way of specifying what should be filled where. Because almost no one has used these things, it’s distressingly difficult to get the extensions to not autofill things in particular fields, but it is useful for instructing what should go where, e.g. autocomplete="cc-exp-year" for credit card expiry year. Other particularly useful values that I like: current-password, new-password, one-time-code. The HTML spec is also good reading on this topic: https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill https://html.spec.whatwg.org/multipage/form-control-infrastr...