Automatically Refresh HTML page after some interval

Today, We want to share with you Automatically Refresh HTML page after some interval.In this post we will show you html meta redirect after 5 seconds, hear for refresh page on button click html we will give you demo and example for implement.In this post, we will learn about meta http equiv refresh content url with an example.

Automatically Refresh HTML page after some interval

There are the Following The simple About Automatically Refresh HTML page after some interval Full Information With Example and source code.

Read Also:  Routing with Multiple Views using Angular Example

As I will cover this Post with live Working example to develop auto refresh html page using javascript, so the Automatically refresh page after some interval for this example is following below.

Example 1: Refresh div after some Interval

Simple Reload page using JavaScrip setTimeout Method

    <!DOCTYPE html>
    <html>
    <head>
        <title>pakainfo.com - Reload page after 8 seconds</title>
        <script>
           setTimeout(function(){
               location.reload();
           },8000); // 8000 milliseconds means 8 seconds.
        </script>
    </head>
    <body>
    <h1>Welcome to My Website Pakainfo.com !</h1>
    </body>
    </html>

Hint: 1000 ms = 1 second.

Read Also:  Upload Multiple Images With Image Preview Using jQuery,Ajax And PHP

Example 2 :

HTML Reload page using JavaScrip setInterval Method

    <!DOCTYPE html>
    <html>
    <head>
        <title>pakainfo.com - Reload page after 8 seconds</title>
        <script>
        function webPageautoRefresh()
        {
            window.location = window.location.href;
        }
         setInterval('webPageautoRefresh()', 8000);
        </script>
    </head>
    <body>
    <h1>Welcome to My Website Pakainfo.com !</h1>
	<p>Automatically refresh page after some interval	</p>
    </body>
    </html>

Example 3 :

Simple Reload page using meta tag in head tag

    <!DOCTYPE html>
    <html>
    <head>
        <title>pakainfo.com - Reload page after 10 seconds</title>
        <meta http-equiv="refresh" content="10" />
    </head>
    <body>
    <h1>Welcome to My Website Pakainfo.com !</h1>
	<p>html meta redirect after 10 seconds</p>
    </body>
    </html>

Angular 6 CRUD Operations Application Tutorials

Read :

Read Also:  jQuery Difference between internal and external script

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Automatically Refresh HTML page after some interval.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.


Related FAQ

Here are some more FAQ related to this Article:

  1. Read Also:  Simple 5 star Rating using Pure CSS
  2. Read Also:  how to call factory method from controller in angularjs
  3. Read Also:  jQuery ToggleClass to Switch Between Classes
  4. Read Also:  PHP Multiple images upload using jQuery Ajax
  5. Read Also:  Create Contact Form And Send Email using PHP
  6. Read Also:  PHP Laravel AJAX Request GET and POST Example
  7. Read Also:  IMPLODE() AND EXPLODE() FUNCTION IN PHP
  8. Read Also:  PHP Laravel AJAX Request GET and POST Example
  9. Read Also:  how to call factory method from controller in angularjs
  10. Read Also:  PHP Multiple images upload using jQuery Ajax