Disable Chrome Autofill & Autocomplete With jQuery - disableAutoFill

Disable Chrome Autofill & Autocomplete With jQuery - disableAutoFill
File Size: 863 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT

disableAutoFill is a lightweight jQuery plugin for disabling autofill and autocomplete functionalities in Google Chrome browser.

How it works:

  • Add random chars on "name" attribute to avid Browser remember what you submitted before.
  • Replace submit button to normal button to make sure everything works fine.

How to use it:

1. Insert the minified version of the disableAutoFill plugin after loading jQuery JavaScript library.

<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" 
<script src="src/jquery.disableAutoFill.min.js"></script>

2. Call the function disableAutoFill() on the html form and done.

<form id="demo">
  <div class="form-group">
    <label for="exampleInputEmail1">Email address</label>
    <input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Enter email">
    <small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small>
  <div class="form-group">
    <label for="exampleInputPassword1">Password</label>
    <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
  <button type="submit" class="btn btn-primary">Submit</button>



3. Specify the password field when there is no [type=passoword] field.

  textToPassword: true,
  passwordFiled: ''

4. Specify the submit button when there is no [type=submit] button.

  submitButton: ''

5. The plugin also provides a callback function which can be used to validate the form fields.

  callback: function() {
    return true;

6. Determine whether or not to randomize the input name..

  randomizeInputName: true

7. Specify the character used to hide the real password value.

  hidingChar: '●'

8. Enable/disable the native HTML form validation.

  html5FormValidate: false


v1.2.8 (2019-04-04)

  • Fix asterisk in password problem and add hiding character parameter
  • Add support to multiple passwords fields


  • Supports multiple password fields.


  • Fixed: radio button


  • Fixed: "realPassword" array goes out of sync if user backspaces / deletes / overwrites


  • Fixed issues with passwordField


  • v1.2.4: Fixed HTML5 form validation


  • Bugfix


  • Fix mutli form submit button issue

This awesome jQuery plugin is developed by terrylinooo. For more Advanced Usages, please check the demo page or visit the official website.