There are methods and apparatus, including computer program products, for
preventing data loss. For example, there is a client agent that
automatically performs a data loss prevention action in response to
detecting (i) a client navigation event and (ii) a difference between a
client data state and a base data state, wherein the detection of the
difference between the client data state and the base data state occurs
without transmitting data to and from a server. The data loss prevention
action can include generating a user prompt. The navigation event can
include a navigation that replaces a user interface that the user had
used to modify data associated with an application program. The data loss
prevention action can be performed without receiving instructions
corresponding to the action from the application program.