Don't save again until the first save has been registered. If it times out, try again.
Also - I'm not necessarily using XMLHTTPRequest, I'm leaning towards dynamic scripting as my site will need this widget to run across several different subdomains - dynamic scripting doesn't have a lot of the nice status functionality that XMLHTTPRequest does...
When a user needs to save their note
If the note is already saving
Set note.saveAgain = true
else
Start the process of saving the note
When the note has saved
If note.saveAgain == true
Set note.saveAgain = false
Start the process of saving the note again
That doesn't require a queue. It also only saves the most up to date version.Thanks again.
Edit: How dare I ask to be compensated for my time. I should be ashamed of myself.
If you have any more questions, feel free to ask.
If the user deletes the note and the server receives the delete request before other modification deltas, simply ignore the deltas that arrive after the delete command.
In my opinion it's a lot more simple to solve this kind of problems on the server side of a web application.