I Want JavaScript To Redirect - Not Working

I want to redirect my website to https://uprightcode.com/comming-soon
my code so far in js is

location.replace("https://uprightcode.com/comming-soon")

When I save and deploy successfully and the indicator is published in Netlify I try going on my website again and it has shows the homepage and I want a few minutes and go grab a snack, I come back and it is still not redirected. What is the problem?

I have also tired

window.location = "https://uprightcode.com/comming-soon";

Video to see No Redirect!!! on Vimeo

(I also have the same three out here I Want JavaScript To Redirect - Not Working - #2 by m3g4p0p - JavaScript - SitePoint Forums | Web Development & Design Community)

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.