The edit task in the web ADF application does not prompt with a message that edits will be discarded if the edit task is closed without saving. This behavior occurs with versioned data and non-pooled map services.
If the map service includes a non-versioned layer, the message 'Edits will be discarded, exit editing?' does appear. It also appears if you configure the edit task to allow editing on more than one version.