Those rants aside, if you really want to do this, then all you need to do is react on the onunload event of the containing window or frame.
Main Topics
Browse All TopicsWhat is considered the best way to prompt the user to save their work when navigating away from a page or closing a broswer. Gmail does this so well. Is there a recommended way to do this or are there any articles on the subject? Any 3rd party controls to facilitate this?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
The application is a web app with a lot of work being done on the page between saves. The customers are asking us to implement this because they lose a lot of work when they forget.
You write "all you need to do is react on the onunload event of the containing window or frame."
If this is where you do it, this is where I need the assistance.
Thanks
look for the onbeforeunload event. now supported in firefox too.
http://www.webreference.co
> The customers are asking us to implement this because they lose a lot of work when they forget.
a very good reason to implement it then!
You could also make it even nicer and save the data using the XHR object (AJAX), like Word saves its data every 5 minutes. Because, whatever you do, it is never possible to recover from a crash. And saving the data often using Javascript and XHR will not bother the user but benefit him.
Business Accounts
Answer for Membership
by: abelPosted on 2008-07-21 at 09:12:44ID: 22051828
I don't believe there's a "best practice" paper about this. However, be very careful with this type of thing. It is generally considered very annoying when a user has to do something extra when wanting to close the browser (consider having three applications in three tabs and having to react on each one of them, that's a huge annoyance and will likely to keep people away from your site).
However, there are of course a couple of use-cases where you want to react on the user leaving a web page. For instance if the webpage contains a web application with unsaved data. But even then...
One situation where it is badly implemented is the Exchange Server Outlook Online application. It is hardly ever needed that it warns you when closing the window and it always asks the annoying "are you sure to...?".