Skip to content Skip to sidebar Skip to footer

Disable Autocomplete In Chrome 66

Is there any way to disable autocomplete on a text field in chrome 66? I have tried a number of options like : autocomplete='off' autocomplete='false' autocomplete='disabled' auto

Solution 1:

I used this code and it is working for me. I hope it will also helpful for you. :) Enter your type with readonly and then below mention code.

<input readonlytype="email" onfocus="if (this.hasAttribute('readonly')) {
    this.removeAttribute('readonly');
    this.blur();    this.focus();  }" />

Solution 2:

A lot of browsers refuse to adhere to what you have mentioned - the best way is to make an element readonly and then on hover/click/blur/focus, remove readonly.

So you could give it a class such as disable_autocomplete and also make the input field readonly.

Then when the field is hovered, focussed, or clicked you can remove readonly. Optionally, add it back when unfocussed.

Solution 3:

$(document).ready(function(){ 
     $("input").val("");
});

So, Chrome just sets the value of element when autofilling them. Just try that, else you can try set some interval, wich will check value in HTML code, because Chrome not put new value to HTML code, just puts it in memory for itself.

Solution 4:

I acheived the auto complete functionality to be disabled in chrome by giving

<formautocomplete="off">

and

var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
element.autocomplete = isChrome ? 'disabled' :  'off';

where isGoogleChrome is a function to find whether the browser is chrome written with help of this post.

JavaScript: How to find out if the user browser is Chrome?

Solution 5:

I found something :

 <input autocomplete="off" onfocus="this.setAttribute('autocomplete', 'I don\' t want this Google');" />

Good Day Everybody

Post a Comment for "Disable Autocomplete In Chrome 66"