HTML web page auto refresh

To refresh HTML web page you can simply use settimeout javascript function.

Here is a sample from tutorials point :

https://www.tutorialspoint.com/javascript/javascript_page_refresh.htm


<html>
   <head>
      
      <script type = "text/JavaScript">
         <!--
            function AutoRefresh( t ) {
               setTimeout("location.reload(true);", t);
            }
         //-->
      </script>
      
   </head>
   
   <body onload = "JavaScript:AutoRefresh(5000);">
      <p>This page will refresh every 5 seconds.</p>
   </body>
   
</html>

Leave a Reply

Your email address will not be published. Required fields are marked *