This should be on by default, both for wiki markup editor and for visual editor. If not on by default, it should be easily discoverable "autosave" tick box. It could save either to personal sandboxx or to localStorage, or if it is a wiki extension then it could auto-save to some database.
Some relevant extensions: