Answer the question
In order to leave comments, you need to log in
How to make one of the tabs of an open site "main"?
A browser can have multiple tabs open for the same site.
It is necessary to implement so that only one of them executes the conditional JS code. For example, once every 10 seconds, it sent an Ajax request and, depending on the response, showed a modal window.
If this tab is closed, another one should take its place and start processing the same code, etc.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question