# Detect browser close or redirection

**URL:** https://forum.kirupa.com/t/detect-browser-close-or-redirection/318614
**Category:** Uncategorized
**Created:** [January 25, 2011, 10:21am UTC](https://forum.kirupa.com/t/detect-browser-close-or-redirection/318614 "2011-01-25T10:21:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Leo75](https://avatars.discourse-cdn.com/v4/letter/l/779978/32.png) [@Leo75](https://forum.kirupa.com/u/Leo75)
#### Post date: [January 25, 2011, 10:21am UTC](https://forum.kirupa.com/t/detect-browser-close-or-redirection/318614/1 "2011-01-25T10:21:57Z")

</div>

Hi,  
Would like to know if there is a way to detect if the user closes the browser that the swf is in or just detect when he or she leaves the same swf.  
I need that to update some information, in this case, a logoff or logout situation.  
Everything in AS2.  
🙂

THANKS!

Leo.
