Perspective Session Cleanup

Perspective session messages are sent from the gateway (any script that could send one has to run on the gateway in Perspective) so it wouldn't work as a heartbeat to detect browser connection loss.

The session shutdown event does eventually detect disconnection, but it takes time:

More discussion on the topic, including a link to a relevant feature request: