Page Load Delay

Control the flow. Use JavaScript's `setTimeout` function to introduce a pause before executing navigation logic.

Waiting for input...

Copy the Script

<script>
function delayedRedirect() {
    document.getElementById("msg").innerHTML = "Redirecting in 5 seconds...";
    
    setTimeout(function() {
        window.location.href = "http://www.google.com";
    }, 5000);
}
// window.onload = delayedRedirect; // Uncomment to run on load
</script>

<div id="msg"></div>

Frequently Asked Questions

It gives users time to read a 'Thank You' message or notice before being moved. It is commonly used after form submissions or login screens.

Yes. You would need a `setInterval` that updates a text number every second, alongside the `setTimeout` that triggers the redirect.

Yes, if you provide a button that calls `clearTimeout(timerID)`. Otherwise, the redirect is automatic.