Automatically refresh the web page after a certain period in the web browser. We will preset a time and the browser automatically refresh the web page.

Approach 1: use meta tag.

Example: Every 20 seconds web page will refresh

<meta http-equiv="refresh" content="20">

Approach 2: use JavaScript

Example: very 5 seconds web page will refresh

<!DOCTYPE html> 
        Reloading page after 5 seconds 
        function autoRefresh() { 
            window.location = window.location.href; 
        setInterval('autoRefresh()', 5000); 
    <h1>Hello world!</h1>