How to Refresh Webpage every few Mins using JavaScript ?

In one of my previous blog post , i explained how to refresh Webpage every few minutes using HTML meta tag . In this blog post , i will explain how one can refresh the webpage using JavaScript.

Assuming that the webpage needs to be refreshed every 60 seconds , below is a sample code snippet that demonstrates how to refresh the page with the window.location.reload() JavaScript function.

How to Refresh Webpage every few Mins using JavaScript ?




  <body onload="setInterval('window.location.reload()', 60);">


If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Leave a Reply


Interesting BlogPosts to read

How to Flatten a 2-D array in JavaScript ?
You can flatten a 2-D array in JavaScript using the concat and apply method as shown in the below co...
How to convert from Degree to Radian in JavaScript ?
Assume that you have an angle in degree and you wish to convert it to radians in JavaScript so that ...
JavaScript Tutorial #8 - Operators in JavaScript
JavaScript supports different types of operators that includes Assignment Operator JavaScript supp...