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

Semantic web pages XHTML semantic markup

Another important aspect of separating structure ...

Native JS to achieve drag photo wall

This article shares with you a draggable photo wa...

How to install jupyter in docker on centos and open ports

Table of contents Install jupyter Docker port map...

How to reset the initial value of the auto-increment column in the MySQL table

How to reset the initial value of the auto-increm...

Use Smart CSS to apply styles based on the user's scroll position

By adding the current scroll offset to the attrib...

WeChat applet component development: Visual movie seat selection function

Table of contents 1. Introduction 1. Component da...

Summary of problems that may occur when using JDBC to connect to Mysql database

First, clarify a few concepts: JDBC: Java databas...

Example of using JS to determine whether an element is an array

Here are the types of data that can be verified l...

How to implement Nginx configuration detection service status

1. Check whether the check status module is insta...

Complete steps to use vue-router in vue3

Preface Managing routing is an essential feature ...

In-depth analysis of MySQL deadlock issues

Preface If our business is at a very early stage ...

TimePicker in element disables part of the time (disabled to minutes)

The project requirements are: select date and tim...