learning-unlimited/ESP-Website — Issue #262: QSD Clobber Prevention
Author: pteromys
Created: 2012-01-18 16:55:40+00:00
State: open
Labels: UserInterface

Right now it's pretty easy to make QSD edits and then accidentally clobber them:

1. Make edits
2. Click a link
3. Use the browser "back" button. The browser loads the page from local cache, so it doesn't have the new version.
4. Activate the edit box to see if the source code is updated. (It isn't, at least not locally.)
5. As soon as the edit box is deactivated, it uploads the source code it holds, overwriting the edits from step 1.

There are a few proposals to deal with this:

1. Make activation of the edit box request the most recent version from the server via an XMLHttpRequest. (Currently the source is included in the page in a hidden textarea.)
2. Make the server reject all QSD edits that aren't based on the most recent version of a page.
3. Force a full-page refresh upon submission of an edit.

Personally, my favorite is (1); and even with (1) implemented, (2) could still be useful for keeping editors from stepping on each other's toes by accident. I'm less in favor of (3) because it interrupts the user every time.