# Detect if browser is closed

**URL:** https://forum.kirupa.com/t/detect-if-browser-is-closed/226345
**Category:** Uncategorized
**Created:** [May 20, 2007, 4:36pm UTC](https://forum.kirupa.com/t/detect-if-browser-is-closed/226345 "2007-05-20T16:36:15Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mnbvcxz](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@mnbvcxz](https://forum.kirupa.com/u/mnbvcxz)
#### Post date: [May 20, 2007, 4:36pm UTC](https://forum.kirupa.com/t/detect-if-browser-is-closed/226345/1 "2007-05-20T16:36:15Z")

</div>

how can i detect if someone has closed the browser that was using the swf. i want to then execute some code, and only then close the browser.

is this possible
