Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable autocomplete and autofill for chrome / jquery

I want to disable both Chrome autocomplete AND Chrome autofill.

I'm using JQuery UI to autocomplete an input field. My jquery-ui autocomplete works fine, however chrome browser displays it's own autofill on top of mine making it difficult for users to select the correct dropdown item.

I'm using autocomplete="off" which seems to disable autocomplete for chrome but shows autofill options.

I've tried the following:

  • autocomplete="chrome-off" autocomplete="false" autocomplete="disabled"

Those attribute values ( or any invalid attribute values ) seem to be disabling the *autofill but do enable autocomplete.

Important: I cannot use random name attributes since I am performing ajax requests for my own jquery-ui autocomplete

like image 340
Nick Arnie Avatar asked Sep 06 '25 15:09

Nick Arnie


1 Answers

autocomplete="off"

doesn't work anymore. The only thing which works from 2019 is

autocomplete="new-password"

like image 169
Ejilarasan J Avatar answered Sep 08 '25 08:09

Ejilarasan J