1

I have to open a new tab in javascript and I would like to be noticed (on the main tab, the first one), if the user close the tab or if the user change the url. I know that if the second tab is on an other domain, you cannot access to the location attributes and I understand. But is there any way to detect if the user changes the URL of the child tab ? A kind of bit or flag giving me this information ?

In advance, thank you.

Anas
  • 11
  • 1

1 Answers1

0

Changing the URL will result in a reload of the page, so you should detect when a page is reloaded, hence: Check if page gets reloaded or refreshed in Javascript

Greedo
  • 3,438
  • 1
  • 13
  • 28