How to Auto Refresh page every 5 seconds using JavaScript?

Published on July 7, 2013 by abundantcode

Filed under JavaScript

Last modified July 7, 2013

Print this page

rate 1 star rate 2 star rate 3 star rate 4 star rate 5 star
Your rating: none, Average: 1.8 (5 votes)

This article have been viewed 6097 times

Below is a sample code demonstrating how to refresh the page automatically every 5 seconds using JavaScript.

How to Auto Refresh page every 5 seconds using JavaScript?

<body onload="javascript:setTimeout("location.reload(true);",5000);">
0saves
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 Comment


x

You might be Interested in these Posts

ES6: The future is now at Warrington on October 18 , 2016

JavaScript North West User Group is hosting its user group meet on the topic "ES6: The future i...

How to append an array to another in JavaScript ?

In JavaScript , you may want to append one array to another array(s) to combine their elements resul...

How to pass a function as parameter in JavaScript ?

There are times when you might want to pass a function as argument to another function in JavaScript...