Your two options are either to use real HTTP redirection, or to use JavaScript location.replace.
The first is better, but if there is some reason, you cannot do this, it location.replacecan work as an alternative:
document.location.replace(redirectURL)
location.replace , "" . , - , , JavaScript.