How to disable the automatic password saving prompt function of Chrome browser

How to disable the automatic password saving prompt function of Chrome browser
Note: In web development, after adding autocomplete="off" to the form, IE and FF will not prompt to save the password. However, when logging into the system with the Chrome browser, a prompt to automatically save the password will pop up. From a security perspective, this browser function needs to be disabled to improve system security.

Most browsers determine the password field based on the form field type="password", so for this situation, you can use the method of "dynamically setting the password field":

Copy code
The code is as follows:

<input type="text" name="password" onfocus="this.type='password'" autocomplete="off"/>

Explanation: This document box becomes a password field only when it gets the focus.

It has been tested that this method is simple and effective, and can disable the prompt box in the Chrome browser that prompts you to save passwords.

Note that onfocus="this.type='password'" cannot be recognized on IE. Compatibility needs to be considered and it can be handled when the web page is initialized. For IE browser, after using type="password" autocomplete="off" on the input tag, the browser will not prompt to remember the password.

<<:  Vue3+Element+Ts implements basic search reset and other functions of the form

>>:  SQL optimization often makes mistakes, that's because you don't understand the usage of MySQL explain plan

Recommend

Detailed explanation of the failure of MySQL to use UNION to connect two queries

Overview UNION The connection data set keyword ca...

Native js to achieve star twinkling effect

This article example shares the specific code of ...

Vue advanced usage tutorial dynamic components

Table of contents Basic description AST parsing R...

How to create a file system in a Linux partition or logical volume

Preface Learn to create a file system on your sys...

Some parameter descriptions of text input boxes in web design

In general guestbooks, forums and other places, t...

CSS3 to achieve floating cloud animation

Operation effect html <head> <meta chars...

MySQL InnoDB row_id boundary overflow verification method steps

background I talked to my classmates about a boun...

Three ways to create a gray effect on website images

I’ve always preferred grayscale images because I t...

Mysql delete data and data table method example

It is very easy to delete data and tables in MySQ...

Use pure JS to achieve the secondary menu effect

This article example shares the specific code of ...

Mysql database master-slave separation example code

introduce Setting up read-write separation for th...

Detailed explanation of MySQL database binlog cleanup command

Overview Today I will mainly share how to correct...

Example of cross-database query in MySQL

Preface In MySQL, cross-database queries are main...

An example of how JavaScript can prevent duplicate network requests

Preface During development, we often encounter va...