From https://stackoverflow.com/a/5411601/5031164
You should use html meta tag for newer browsers AND a javascript script for the older one, at the same time:
<meta http-equiv="refresh" content="0; url=https://example.com/" />
<script type="text/javascript">
window.location.href = "https://example.com"
</script>
I also report:
For completeness, I think the best way, if possible, is to use server redirects, so send a 301 status code [...]