Thursday, 25 October 2018

How to refresh a page after random times?

If you want refresh your web page randomly timer then just copy this code and paste your web page.
This script automatic refresh your web page between 30 to 60 seconds.
This script very helpful if you provided CPM banner ads on your web page.

Coding Start



function reloadMe() {



function getInterval(){

var lowerBound = 10;

var upperBound = 15;

var randNum = Math.floor((upperBound-lowerBound+1)*Math.random()+lowerBound) * 1000;

return randNum;


var interval = getInterval();

var srcInterval = setInterval("reloadMe()",interval);



<body> <script type="text/javascript">document.write ("This page will reload after "+interval/1000+" seconds");</script>
Your content here </body>

Script End

No comments:

Post a Comment