-3

So basically I want to make it so when a user joins the index.html page they will automatically be transferred to the home.html page. I tried researching this but I didn't find anything that helped so please could someone help me.

CharlieW
  • 35
  • 7
  • 5
    You didn't find anywhere on the internet how to make a redirection in Javascript? – Jeremy Thille Nov 23 '21 at 12:19
  • 1
    Resisting the temptation to lmgtfy this: [window.location](https://developer.mozilla.org/en-US/docs/Web/API/Window/location) is settable. – Daniel Beck Nov 23 '21 at 12:43
  • Does this answer your question? [How do I redirect to another webpage?](https://stackoverflow.com/questions/503093/how-do-i-redirect-to-another-webpage) – Rob Jul 10 '22 at 01:23

1 Answers1

1

You can do it with meta-tag:

<head>
  <meta http-equiv="refresh" content="0;url=yourUrl">
</head>

Or just javascript:

window.location.href=yourUrl
Ginés Ruiz
  • 183
  • 11