Before marking this question as duplicate READ THIS QUESTION
I'm searching for a way that when a visiter leaves my webpage, he is redirected to another page. (He shouldn't close the page)
Some examples:
- I got the page open and I open another tab in my browser, then the person should be redirected to the other page, because he left the current "open" tab.
- When the person opens another program, the website isn't "active" anymore and it should redirect to another page.
I don't want an action when the user leaves the webpage, I want a reaction if he leaves it open but opens another program, another tab, etc.