Answer the question
In order to leave comments, you need to log in
How to update data while client is on another tab via SignalR?
Good evening! I have such a system on my site that if a client is connected to the site through a js client using SignalR, then it is updated exactly every 2 minutes and new data arrives.
But the fact is that when the client leaves the tab and then returns back (for example, after 10 minutes), the missing data is not received. How to make them come as soon as the client returns to the tab?
Thanks in advance
Answer the question
In order to leave comments, you need to log in
Hey!
window.onfocus - the event when the user returns to this tab
window.addEventListener("focus", function(){
// Тут делай что нужно
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question