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

URL Rewrite Module 2.1 URL Rewrite Module Rule Writing

Table of contents Prerequisites Setting up a test...

Tutorial on how to quickly deploy a Nebula Graph cluster using Docker swarm

1. Introduction This article describes how to use...

How to add rounded borders to div elements

As shown below: CSS CodeCopy content to clipboard...

Solve the problem of docker log mounting

The key is that the local server does not have wr...

Useful codes for web page creation

<br />How can I remove the scroll bar on the...

HTML is actually the application of learning several important tags

After the article "This Will Be a Revolution&...

Detailed explanation of MySQL database triggers

Table of contents 1 Introduction 2 Trigger Introd...

Tips for viewing text in Linux (super practical!)

Preface In daily development, we often need to pe...

Detailed explanation of mixed inheritance in Vue

Table of contents The effect of mixed inheritance...

Case analysis of several MySQL update operations

Table of contents Case Study Update account balan...

A brief understanding of the relevant locks in MySQL

This article is mainly to take you to quickly und...

TypeScript learning notes: type narrowing

Table of contents Preface Type Inference Truth va...

Bootstrap+Jquery to achieve calendar effect

This article shares the specific code of Bootstra...

Practical method of deleting files from Linux command line

rm Command The rm command is a command that most ...