How to make that in 8 seconds from page 1.html there was an automatic transition to page 2.html

    2 answers 2

    <script type="text/javascript"> setTimeout('window.location="2.html"',8000); </script> 
    • one
      And why not use the tag: <META HTTP-EQUIV = "Refresh" CONTENT = "x; URL = blabla "> <! - x - time in seconds before the start of a new document download; URL - the address of the document on the Internet (may not be specified) -> - Dex
    • Because any opportunity to influence the process disappears. It MUST redirect after 8 seconds (and, like, from the moment the tag is loaded, and not the entire page) - knes
    • Does your method make it possible to return to the page from which the redirect was made? Well, and besides, disabled JavaScript in the browser, MANDATORY will eat. - Dex
    • Are there still such punishments? : D - Zowie
    • @Dex, yes, it does, of course. Disabled javascript ... Disabled javascript on the contrary will allow advanced people to ban the redirect at will Alexandrov. So it is rather a plus. Very advanced people can ban redirects altogether .. - knes
     <meta http-equiv="refresh" content="8;url=2.html>