http-equiv redirect to another html page

1.7k views Asked by At

I am trying to redirect a user on my html page to another html page automatically after three seconds, and I am trying with this code:

<meta http-equiv="refresh" content="3; home.html">

However, I get the error that it expected a "u" after ";" (url=...). I am using Atom and w3c-markup. How can I solve this?

1

There are 1 answers

5
Mehedi Hasan Siam On BEST ANSWER

Try using this. You missed url before using your redirect file

<meta http-equiv="refresh" content="3; URL='home.html'" />

You can also do it by adding some script

<script>
        var timer = setTimeout(function() {
            window.location='home.html'
        }, 3000);
 </script>