JavaScript URL Redirection
JavaScript URL redirect to another page after 5 seconds, fast redirect and delay timer redirect
(() => {
const redirect_url = "https://www.html-code-generator.com/";
const delay = 5; // second
const input_time = document.getElementById("url_time");
let time = input_time.value = delay;
const redirectPage = () => {
if (1 < time) {
time -= 1;
input_time.value = time;
setTimeout(redirectPage, 1000);
} else {
window.location.href = redirect_url;
}
};
redirectPage();
})();
Add Redirect URL
×
Redirect Start
HTML
Paste this code between the body tag where you want it to appear
Paste this code between the body tag, at the bottom of the page