Two ways to prohibit clearing the input text input cache in html

Two ways to prohibit clearing the input text input cache in html

Most browsers will cache input values ​​by default, and only by using ctl+F5 to force refresh can the cache record be cleared.

If you don't want the browser to cache the input value, there are two ways:

Method 1:

Add to the input that you don't want to use cache

XML/HTML CodeCopy content to clipboard
  1. autocomplete = "off" ;eg:
  2. < input   type = "text"   autocomplete = "off"   name = "test"   />   

Method 2:

Add in the form tag where the input is located

XML/HTML CodeCopy content to clipboard
  1. autocomplete = "off" ;eg:
  2. < form   action = "#"   autocomplete = "off" >   
  3. < input   type = "text"   autocomplete = "off"   name = "test"   />   
  4. </ form >   

<<:  Steps to create a CentOS container through Docker

>>:  Pure CSS allows child elements to break through the width limit of parent elements

Recommend

Implementation of Vue 3.x project based on Vite2.x

Creating a Vue 3.x Project npm init @vitejs/app m...

Example of how to create and run multiple MySQL containers in Docker

1. Use the mysql/mysql-server:latest image to qui...

5 MySQL GUI tools recommended to help you with database management

There are many database management tools for MySQ...

How to Monitor Linux Memory Usage Using Bash Script

Preface There are many open source monitoring too...

In-depth explanation of iterators in ECMAScript

Table of contents Preface Earlier iterations Iter...

Application scenarios and design methods of MySQL table and database sharding

Many friends have asked in forums and message are...

How does the MySQL database implement the XA specification?

MySQL consistency log What happens to uncommitted...

TypeScript uses vscode to monitor the code compilation process

Install Install ts command globally npm install -...

Master-slave synchronous replication configuration of MySQL database under Linux

The advantage of the master-slave synchronization...

Implementation of one-click TLS encryption for docker remote api

Table of contents 1. Change the 2375 port of Dock...

Node.js file copying, folder creation and other related operations

NodeJS copies the files: Generally, the copy oper...

Implementation of Docker private warehouse registry deployment

As more and more Docker images are used, there ne...

Delete the image operation of none in docker images

Since I usually use the docker build command to g...

CSS to achieve Skeleton Screen effect

When loading network data, in order to improve th...

Linux unlink function and how to delete files

1. unlink function For hard links, unlink is used...