will my server be notified about disconnect on the client side?
I assume the answer is yes if the disconnect happens explictly like below.
pusher.disconnect()
however what happens if the user simply closes the browser?
Another thing is there a way to notify the server that a certain channel has not been in use by the client(s) for some while?
The connection states documentation shows how to bind to connection state changes.
This really depends on if the browser calls
webSocketInstance.oncloseso the Pusher JavaScript library is informed before the browser is closed. You could always detect this yourself usingwindow.onbeforeunload,window.onunloador theaddEventListenerversions.You can use WebHooks so that when a channel becomes vacated your app server will be informed.