How to redirect to another url on page refresh or page back using JavaScript or (any other easy alternatives );
Asked
Active
Viewed 46 times
2 Answers
0
You can combine the page capture via something like a navigator object shown here:
https://stackoverflow.com/a/36444134/3187487
And then use window.location
to redirect the person to where ever you want from there.

Gerik
- 698
- 3
- 11
0
You can do something like this perhaps:
if (window.performance) {
console.info("window.performance works");
}
if (performance.navigation.type == 1) {
window.location.href = "https://www.example.com"
}

BlackBeard
- 10,246
- 7
- 52
- 62