JQuery Automatically Refresh or Reload a Page Tutorial

JQuery Automatically Refresh or Reload a Page Tutorial

jQuery automatic refresh or reloading a page example. In this tutorial, you will learn how to automatic refresh or reloading a web page using jQuery.

And as well as, learn how to refresh or reload web page using html meta property.

Sometimes, you need to automatically refresh or reloading the web page. So, this tutorial will guide you on how to automatically refresh or reload a web page using jQuery and HTML meta property.

How to Automatically Refresh Or Reload Web Page

Now, you will learn three methods to reload or refresh web page using jquery:

Method 1 – For Reload Or Refresh Web Page

Now, you will learn how to refresh or reload web page using jQuery setTimeout method. See the following example:

<head>
    <title>Jquery Page Reload after 10 seconds - Tutsmake.com</title>  
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>
</head>
<body>
    <h2>Hello, I am Tutsmake.com</h2>
    <script type="text/javascript">
        setTimeout(function(){
            location.reload();
        },15000);
    </script>
</body>
</html>

Method 2 – For Reload Or Refresh Web Page

Now, you will learn how to refresh or reload web page using jQuery setInterval method. See the following example:

<html lang="en">
<head>
    <title>Page Reload after 10 seconds - Tutsmake.com</title>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>
</head>
<body>
    <h2>Hello, I am Tutsmake.com</h2>
    <script type="text/javascript">
        function autoRefreshPage()
        {
            window.location = window.location.href;
        }
        setInterval('autoRefreshPage()', 15000);
    </script>
</body>
</html>

Method 3 – For Reload Or Refresh Web Page

Now, you will learn how to refresh or reload web page using meta. See the following example:

<html lang="en">
<head>
    <title>Page Reload after 10 seconds - Tutsmake.com</title>  
    <meta http-equiv="refresh" content="10" />
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>
</head>
<body>
    <h2>Hello, I am Tutsmake.com</h2>
</body>
</html>

Recommended jQuery Tutorials

AuthorAdmin

My name is Devendra Dode. I am a full-stack developer, entrepreneur, and owner of Tutsmake.com. I like writing tutorials and tips that can help other developers. I share tutorials of PHP, Python, Javascript, JQuery, Laravel, Livewire, Codeigniter, Vue JS, Angular JS, React Js, WordPress, and Bootstrap from a starting stage. As well as demo example.

Leave a Reply

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