Automatically Refresh or Reload a Page using jQuery Example

Automatically Refresh or Reload a Page using jQuery Example

In this post we will give you information about Automatically Refresh or Reload a Page using jQuery Example. Hear we will give you detail about Automatically Refresh or Reload a Page using jQuery ExampleAnd how to use it also give you demo for it if it is necessary.

If you require to make auto refresh your web page after some time period using jquery or code javascript then you can do it you can do it using javascript. we will auto reload page using setTimeout(), setInterval() and meta http-equiv tag. we can simple do it in php, .net, java, laravel, codeigniter etc.

Sometimes, we require to reload page after every 5 seconds, 10 seconds, 15 seconds, 20 seconds, 25 seconds, 30 seconds etc. In this post i will explain how to do it and there are many way to refresh html page. So here you will see three example of auto refresh php page using javascript, you can also manually interval time of page refresh. So let’s see bellow examples:

There are listed examples bellow:

1)Example 1(Using setTimeout)

2)Example 2(Using setInterval)

3)Example 3(Using meta)

Example 1(Using setTimeout)

<!DOCTYPE html>

<html>

<head>

<title>Page Reload after 10 seconds</title>

</head>

<body>


<h2>Hi, I am Itsolutionstuff.com</h2>


</body>


<script type="text/javascript">

setTimeout(function(){

location.reload();

},10000);

</script>

</html>

Example 2(Using setInterval)

<!DOCTYPE html>

<html>

<head>

<title>Page Reload after 10 seconds</title>

</head>

<body>


<h2>Hi, I am Itsolutionstuff.com</h2>


</body>


<script type="text/javascript">

function autoRefreshPage()

{

window.location = window.location.href;

}

setInterval('autoRefreshPage()', 10000);

</script>

</html>


Example 3(Using meta)

<!DOCTYPE html>

<html>

<head>

<title>Page Reload after 10 seconds</title>

<meta http-equiv="refresh" content="10" />

</head>

<body>


<h2>Hi, I am Itsolutionstuff.com</h2>


</body>

</html>

Above three example, will auto refresh after every 10 seconds, you can also modify it. because it’s very simple.

I hope it can help you…

Hope this code and post will helped you for implement Automatically Refresh or Reload a Page using jQuery Example. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs

For More Info See :: laravel And github

Leave a Comment

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

28  +    =  38

We accept paid advance and paid guest Posting on our Site : Contact US