Valid use cases for autocomplete=off
bugs.chromium.org
bugs.chromium.org
It's no longer up to you as a developer whether or not you think a field should autocomplete - Google has decided that for you.
Have a look at the address field on this image - you can see that autofill completely obscures Googles own autocomplete (which is a paid service) https://00e9e64bacbf59c74081b665c25aa171225f21f85c7201a66c-a... That's not good for users.
You simply cannot turn off either autofill or autocomplete.
Further info: https://stackoverflow.com/questions/29931712/chrome-autofill...
Please, if you care about autocomplete=off then register a comment on the Chrome bug https://bugs.chromium.org/p/chromium/issues/detail?id=587466
The strange thing is that this even breaks Google's own paid Google Maps autocomplete service - search the text in the linked Chrome bug page for "maps" to see what people have to say about that.
You may want to reupload that image to an image hosting service. When I click that link, I get a page that says:
{"error":{"errors":[{"domain":"global","reason":"lockedDomainExpired","message":"Locked Domain Expired"}],"code":401,"message":"Locked Domain Expired"}}
What’s the right solution to this problem?
Chromium appears to execute some logic to decide if it should show autofill for a given field. This logic appears to be analyzing text before the element that autofill is displayed on. I thought "if I know what that logic is then I can trick it into not displaying." I spent some time looking through the Chromium source code to find that logic and understand it, but I could not find it and don't have time to research it further. This seems the key though to managing this problem.
Other ways of addressing this might include using a different sort of HTML element instead of input. For example textarea or editable div.
More possible pointers to solutions are here: https://stackoverflow.com/a/49161445/627492
Last I checked you can always give Chrome a stronger hint not to autocomplete using something like this:
document.querySelectorAll("input[autocomplete=off]")
.forEach(element =>
element.autocomplete = window && window.chrome ? "hell-no-chrome" : "off"
);
I think it's a shame that they didn't design UI or something to coordinate with the user to override it in less well-behaved web apps. Instead, they just decided to ignore it completely.However they might want to step up their game on not trying to fill every user/password field they find. For example, Gitlab repository mirror settings will be autofilled with your login credentials and they will be saved if you don't pay attention to yellow boxes.
I do like one form of auto-complete, which is the tab-complete in the bash shell. You are not autofilled or autocompleted or auto re-written or auto "you typed foo but we're showing you results for 'food' instead" 99% of the time. But once in a blue moon when you actually want something to be autocompleted, you can get suggestions for that one thing on the spot with an extra keypress. But you have to ask for it. It never messes with you all by itself.
There's a 100 other great reasons on there already. I really hope they don't do this. Most of my user base uses Chrome and I will start getting old tickets re-opened that I won't be able to fix without horrible hacks.
Edit: we've updated the title and turned off some of the flags.
I'm the original poster but I sure as heck didn't do anything to artificially upvote it. I didn't upvote it at all.
As sctb said, though, it's user flags that affected the post's rank the most. Perhaps the editorialized title had something to do with that (https://news.ycombinator.com/item?id=18097611), and/or perhaps there is just fatigue with this class of submissions. People come to HN for unpredictable things, so whenever something starts to get predictable, they get ornery.
I've emailed the HN mods to ask if they have any insight. Maybe it hit some sort of algorithm to prevent spammy posts.
maybe one day, under the governing of Chrome team, the only thing left in web is canvas. Then just thank Chrome for pushing the single-page application concept one step further.
Is there a Firefox extension to ignore autocomplete=off?