Deprecated: get_the_author_email is deprecated since version 2.8.0! Use get_the_author_meta('email') instead. in /home/cloudber/public_html/wp-includes/functions.php on line 4713
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
Author: Wu Chia Chong
My main areas of interest are software architectures and software design methods, patterns, and new trends in software development.