I am using Mobile and Desktop Browsers, When web page opens a socket connection will be established with server. Working fine the browser is in foregroud.
But, when user minimizes the Browser then still that socket is still connected.
What I want is Disconnect socket when Browser goes to background, Just disconnect socket and connect socket back when browser comes back to foreground.
Thanksfor your help!