As far as I understand them, all the methods I have seen so far for this question seem to add the old location to the history. To redirect the page, but do not have the old location in the history, I use the replace
method:
<script> window.location.replace("http://example.com");</script>