Use the command ‘onbeforeunload’ with native JavaScript listener to look for reload and refresh changes and call the Browser SDK's logout method. This will terminate any ongoing calls. More details about the logout method are available in our Browser SDK reference.