using function after settimeout delay code example
Example: javascript run something after x seconds
setTimeout(function(){
location.reload();
}, 3000); //run this after 3 seconds
setTimeout(function(){
location.reload();
}, 3000); //run this after 3 seconds