Discussion
Apple India Pvt Ltd
IN
Last activity: 28 Jul 2021 10:44 EDT
Detect browser close event in pega
For invalidating the session upon browser close, use below script in your portal harness script files. so that it will prompt each time you close the browser like below.
Use below script in your portal harness scripts&styles by creating or updating new js file.
<script type="text/javascript">
window.addEventListener('beforeunload', function (e) {
// here you can call the logoff functionality or whatever your want
e.returnValue = '';
});
</script>