$0.75

How to make redirect to occur in an exact time

Ask a question+
7

I want that my redirect will occur at an exact time, is it possible. I need to set with 7 seconds redirect time set.
Thanks in advance

Alvard 830
add comment

1 Answer

2

You didn’t specify language, or any additional details. So I will assume you mean a webpage.

<script>
         setTimeout(function(){
            window.location.href = 'https://www.yourwebsite.com/whatever/';
         }, 7000);
      </script>

This code will redirect you to another website or page after 7 seconds exactly.
this might be interesting for you https://www.w3docs.com/snippets/html/how-to-redirect-a-web-page-in-html.html

Lainrawr 295
add comment

Your Answer