window.location.replace(...) is better than using
replace() does not keep the originating page in the session history, meaning the user will not have a chance in never-ending back-button fiasco.
In a nutshell:
To simulate someone clicking on a link, use
// similar behavior as clicking on a link window.location.href = "https://www.cloudberry.com.my";
To simulate an HTTP redirect, use
// similar behavior as an HTTP redirect window.location.replace("https://www.cloudberry.com.my");
MDN Web Docs – Window.location