[Solved] Redirecting the customer to page after some delay [duplicate]


This does not work. It is like:

location.href = "https://stackoverflow.com/questions/49859733/index.php";
1000;

Obviously the 1000; expression does not nothing.

Use setTimeout:

setTimeout(function() { location.href = "https://stackoverflow.com/questions/49859733/index.php"; }, 1000);

solved Redirecting the customer to page after some delay [duplicate]