3 codes for automatic refresh of web pages

3 codes for automatic refresh of web pages
In fact, it is very simple to achieve this effect, and this effect cannot even be called a special effect. All you have to do is add the following code to your web page.

1. Automatic page refresh: Add the following code to the <head> area

<meta http-equiv="refresh" content="20">, where 20 means refreshing the page every 20 seconds.

2. Automatic page jump: Add the following code to the <head> area

<meta http-equiv="refresh" content="20;url=https://www.jb51.net">, where 20 means jumping to https://www.jb51.net page after 20 seconds

3. Page automatic refresh js version

<script language="JavaScript">
function myrefresh(){
window.location.reload();
}
setTimeout('myrefresh()',1000); //Specify refresh once every 1 second
</script>

<<:  Ten popular rules for interface design

>>:  Introduction to using the MySQL mysqladmin client

Recommend

Linux MySQL root password forgotten solution

When using the MySQL database, if you have not lo...

Tutorial on installing MySQL 5.7.18 using RPM package

system: CentOS 7 RPM packages: mysql-community-cl...

Several common methods of CSS equal height layout

Equal height layout Refers to the layout of child...

Express implements login verification

This article example shares the specific code for...

Element-ui's built-in two remote search (fuzzy query) usage explanation

Problem Description There is a type of query call...

Let's talk about the difference between MyISAM and InnoDB

The main differences are as follows: 1. MySQL use...

Docker installation and configuration steps for Redis image

Table of contents Preface environment Install Cre...

Use thead, tfoot, and tbody to create a table

Some people use these three tags in a perverted wa...

Troubleshooting the reasons why MySQL deleted records do not take effect

A record of an online MySQL transaction problem L...

The difference between MySQL database stored procedures and transactions

Transactions ensure the atomicity of multiple SQL...

Several ways to implement inheritance in JavaScript

Table of contents Structural inheritance (impleme...

How to use CSS custom variables in Vue

Table of contents The CSS custom variable functio...