core-4420 add user-agent based window closing event for session save