I want to load another HTML page after a specific amount of time

ash9209 picture ash9209 · Mar 30, 2013 · Viewed 110k times · Source

I have one html page "form1.html" which has an animated image. I want to load another page "form2.html" after 5 seconds. How do I do this?

Answer

Walialu picture Walialu · Mar 30, 2013
<script>
    setTimeout(function(){
        window.location.href = 'form2.html';
    }, 5000);
</script>

And for home page add only '/'

<script>
    setTimeout(function(){
        window.location.href = '/';
    }, 5000);
</script>