Edit Conflict Resolution
There are two possibilities:
We can avoid the problem by locking a page. When someone opens the page for editing, no one else can until either 10 minutes have passed (for some value of 10), or the page has been saved.
We can allow the first save to win, and block any subsequent attempt at a save. The second editor is then given the newest version of their page and their version (which hasn't yet been saved) and it's up to them to resolve any differences.
Method two is much less friendly, but it's
Then, if the page being over-written is not the same as the page that was loaded initially, the save is blocked. This happens when someone else has saved a new version, which is only possible if your lock expired.
There are ways to save your changes and try again. Details will follow if requested.