How to make redirect to occur in an exact time

Ask a question+

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 930
add comment

1 Answer


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

            window.location.href = 'https://www.yourwebsite.com/whatever/';
         }, 7000);

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 305
add comment

Your Answer