Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cleaning up when browser closes

Status
Not open for further replies.

cl8855

Programmer
Nov 28, 2000
47
US
Is there any way to tell when someone closes the browser (shuts down the browser window with the X button)?
I would like to do some variable "clean up" when they shut down the browser without logging off my app.

Is this possible?
 
cl8855,

Just use the onunload function.

Note that it has limited application and -- if you're trying cross-browser -- it won't open a window or anything.

Cheers,
[monkey] Edward [monkey]

"Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!" -- inventor of the cat door
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top