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
Asked
Active
Viewed 602 times
1 Answers
-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
-
Does that works as we expect ? I guess this might produce some inconsistency ? – Saad May 08 '21 at 11:43