Hiii everyone, I have created a tab based application using html, and I have used setInterval for synchronizing app data from the server, after regular interval of time. But the problem is that, while synchronizing the data, if i switch between tabs, the executing code is stopped and hence sync cannot be completed.
I thought of calling the sync() in different thread, but couldn't get any help on this. Any ideas about how to implement this, so that while switching between tabs, my JS code keeps on executing. Rough structure of my JS code is
setInterval(
sync();
,3000);
function sync()
{
// Code for sync data
}