I have an index.html that does an automatic redirection with the window.location function to a different domain. The problem is that if the user gives back to the browser it redirects again, so it is a loop.
How can I do that if a user gives back in the browser does not redirect again? for what I know can only be done by saving a cookie each time and redirect only if the cookie does not exist, is that right?
In this case, how can I do this process and what would the code be?
With this line in the index.html it would be enough for the part of saving a cookie for each user?
document.cookie="cookie1";
Thank you very much.