Use pageVisibiltiy API to disconnect eventsource

And reduce number of open connections from client