Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to realize the function of forbidding form user name and password to fill in automatically in jQuery

Shulou Source: shulou.com Published: 2022-05-31 13:48:44 11月16日 Update

In this article Xiaobian for you to introduce in detail "jQuery how to achieve the prohibition of form user name, password automatic filling function", detailed content, clear steps, details handled properly, I hope that this "jQuery how to achieve prohibition of form username, password automatic filling function" article can help you solve doubts, following the editor's ideas slowly in-depth, together to learn new knowledge.

Html login forms are often filled out automatically, and even websites where users have never logged in are filled out automatically, which is very annoying.

Mozilla developer documentation recommends using the form setting property tautocomplete= "off" to prevent browsers from getting data from cache to populate the login form.

However, this scheme is not compatible with some Chrome and Firefox.

In the end, it was decided to use hidden input to accept browser auto-fill, which does not affect the user experience and is compatible with all browsers.

PS: take a look at the ability to prevent forms from automatically filling in usernames and passwords

Some browsers support: autocomplete= "off"

So browsers support:

Add the following two codes to the from that will be automatically populated

Read this, the "jQuery how to achieve the prohibition of form user name, password automatic filling function" article has been introduced, want to master the knowledge of this article also need to practice and use in order to understand, if you want to know more related articles, welcome to pay attention to the industry information channel.

Tags: Forms users browsers functions passwords usernames articles logins content support propriety code attributes suggestions ideas data new knowledge solutions more Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Shulou Information Apple vpn Shulou Technology