Last Updated: March 10, 2019
· sayag125

How can i redirect one page to another page only for 5 seconds ?

Hi, coderwall expert,

I want to redirect page A to page B for 5 seconds and then the page should automatically redirect back to page A..
example is here: i want to redirect this page >> A https://kahoothack.net/kahoot-spam to this page B https://kahoothack.net/kahoot-flood and
And the B page should again redirect to A page. Thanks

my own javascript is

$(document).ready(function() {
    $('#mycontent').html('<a href="https://kahoothack.net/" title="kahoot hacker" target="_blank">Kahoot Hacker</a>');
    setInterval(function() {
        if (!$('#mycontent:visible').length) window.location.href = 'https//kahoothack.net'
    }, 3000)