
In this article, I'll show you how to find out when users change tabs in browsers using JavaScript. It's going to be fun, it's helpful to see how o...
For further actions, you may consider blocking this person and/or reporting abuse
Just a side note, the "blur" event will trigger if you leave the tab opened but just focus another app on your machine... while the visibilitychange will only trigger if you switch to another tab.
I didn't know that, thanks for the note I'll look into it ✨
Real world usage: react-query Window Focus Refetching
Thanks for this mate :)
Simple and a Great one
Thanks.
Thanks! That's useful for example to trigger people to come back :).
You can save the meta document title so when a user come's back the normall meta title is displayed.
Yes, you can do that. You can also send the notifications to the user to come back using Notifications API
We can track the tab switch but there will be an issue when the user presses the back button.
Well, it depends if you have implemented this functionality on the whole website or a single page. There could be two cases-
Cool!
Cool! Great!
Thanks mate 😊
Thank you for the post, bookmarked!
That's great. It's my pleasure ☺️
Omg I didn't know this was even possible, thanks for sharing it.
Yes it is possible, And now you know too. :)
That's great.
Very Good, I never realized it can be this simple, Thanks for this !!!
Thank you so much for this awesome article
This is a pleasure, the positive feedbacks are always inspiring.
Thanks for sharing this.
It's always a pleasure :)
You can use this to evaluate the quality of your articles. If the user switches between tabs, they may not like your article. But I wouldn't change the tab title - it's annoying.
Changing the title is all about showing that it works.I won't change title either.
Thank you for sharing the post. Let me bookmarked it
Amazing 😅 dude
Thanks mate :)
Really appreciate..
😮
Why are you in shock 🤔