mapfishapp window.onbeforeunload

For browsers having localStorage, serialize the current map context on window.onbeforeunload, then store it in localStorage. Give the user a chance to restore it (or to start with a fresh context) on app load.

For the older ones, continue displaying the unfriendly alert message ...