how to delay redirect in javascript
snippet in javascript

how to delay redirect in javascript

user6854

// redirect to google after 5 seconds
window.setTimeout(function() {
    window.location.href = 'http://www.google.com';
}, 5000);