document.addEventListener("DOMContentLoaded", function() { setTimeout(function() { window.location.href = "/your-modal-page-url"; }, 3000); // Adjust the time delay as needed });