If you are editing a question and decide to close the tab/window/whatever, SO opens up a dialog box asking you if you are sure. The buttons for this dialog are "OK" and "Cancel". However, what these map to is not entirely obvious. It would make more sense to change them to action words describing what they do. For example, it could be "Close this Question" and "Stay Here". This would eliminate the need to explain which button does what in the dialog itself and require less work from the user.
What is meta?
- Any Stack Exchange user can ask a question
- The community provides support, votes on ideas, and reports bugs
- Your voice helps shape the way Stack Exchange operates
I don't believe all browsers (or any) support changing the values of the buttons for the onunload event.
In Safari and Firefox it says "Click OK to continue, or cancel to say on this page", which should be enough of an explanation.
That modal dialog is the created via the window.onbeforeunload handler - the dialog's text is whatever string you return from the handler function.
Each browser has their own display for the "OK" and "Cancel" buttons, so we really can't control what's rendered.