-1

I would like to make sure that when someone closes my website page, they will automatically open it in a new tab, as you have probably seen in some annoying ads. please help me.

  • 3
    Impossible. If this was allowed it would be abused such that you would never be able to leave a webpage, since it could just reopen it when it detects the window `onbeforeunload` event. – Spectric May 19 '21 at 18:59

1 Answers1

1

This is unfortunately not possible as the browser contains the settings associated with this behavior.

Here is a link to a similar question HTML: how to force links to open in a new tab, not new window