Reputation: 6752
I am messing around with some web pages and was wondering if it is possible to tell if my page is not the active page on a web browser. I am looking to tell if my page is minimized or is not the current tab. I am not asking about a particular language, but more just wondering if it is possible to get this sort of information.
Upvotes: 1
Views: 3549
Reputation: 5714
Yes, its totally possible, with javascript.
See these answers:
Determine whether webpage has foreground window focus/is active tab?
How to tell if browser/tab is active
Is there a way to detect if a browser window is not currently active?
Upvotes: 3
Reputation: 29
You can check it with Javascript and then send a message to the server. But since the user can alter/disable the script you can never know for sure.
Upvotes: 0