I was tried to prevent to store the username and password in Google Chrome password manager. so, i was changed the type password to text in the password field using following lines in JQuery in $(document).ready section.
var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
if (isChrome) {
$("#UserPassword").attr("type", 'text');
$("#UserPassword").attr("style", "-webkit-text-security:disc;");
}
else {
$("#UserPassword").attr("type", 'password');
}
but, i faced, some issue due to the address fill suggestion. it shows the already typed values in the suggestion. how to prevent show the suggestion in field or how prevent google chrome password manager to save the password from my site.
Enable Suggestion in Google Chrome:
- Open settings page in Google Chrome
- Select Autofill and password in left panel
- Then select the Addresses and more in Right Panel and enable the Save and fill addresses option.
Any one knows please give me suggestion for solve this issue
2
Answers
I am asked about autofill in field. i required for avoid show suggestion in that fields.
Now, i got one solution for avoid this scenario.
In the Suggestion show based on the field name.
so,i was set the dynamic name for the field with unique id. in form submit event, i changed the field name as i required.
Now, the suggestion box is not appeared in that field
Using JavaScript, you can disable text box suggestions in Google Chrome by using the autocomplete attribute of the input element.