Reputation: 15
I am new at javascript, I am trying to make a script to reload a web page after some time but when the time is complete the error shows up and it does not reload the page.
var url = window.location.href;
console.log("My url: "+url);
console.log("Ten seconds");
setTimeout(function(){reload();}, 10000);
function reload(){
console.log("Refreshing to... " + url);
wndow.location.href = url;
}
I do not know what to do :(
Upvotes: 0
Views: 81