-1

Actually I am trying to determine the user online status and therefor need to update status when the tab closes. But issue is that I need to determine the number of tabs so that if user has opened multiple tabs, it should not change its status and only update when there is no similar tabs opened. Thanks

Saad
  • 21
  • 1
  • 7

1 Answers1

-1

You can use SessionStorage or LocalStorage to set a value that indicates that the user has opened a tab. Then when they open another one, you can read that value and determine what to do.

Raed
  • 519
  • 1
  • 6
  • 23