[wp-hackers] Autosave

Robert Deaton false.hopes at gmail.com
Mon Jan 2 06:14:44 GMT 2006

On 1/2/06, Andy Skelton <skeltoac at gmail.com> wrote:
> As long as it's a hot topic, let's give it a proper subject and proper
> treatment.
> The big idea is to keep a copy of the textarea on the server without
> the user having to click Save. Let's settle on some details before
> somebody jumps in to write the code. (It's a new feature anyway,
> something that won't be put in the core at this point in the dev
> cycle.)
> I like Matt's idea of sending the content to a user option. I'd keep
> it to one bucket per user so there is no extra UI required.
> Here's a possible scenario:
> 1. User starts typing masterpiece in New Post/Page screen
> 2. At intervals of seconds or keystrokes, content is silently sent to server
> 3. Server saves it in that user's autosave bucket
> 4. Cat chews through PC power cord (any catastrophe will do here)
> 5. User switches computers, goes to Write Post/Page screen
> 6. Server sees autosave populated, gives user the option to recover
> 7. User clicks "Yes, please recover my typing!"
> 8. Server responds with New Post/Page screen with textarea populated
> 9. User dedicates masterpiece to dead cat and WP Autosave, clicks Publish
> 10. Server clears the user's autosave bucket on Publish or Save
> The interval in Step 2 is a design decision or user option.

I do love the way that gmail does this. If I remember correctly, at
one minute intervals, gmail saves a copy of what you are writing as a
draft. There is a small, unobtrusive button, that lets you "Save Now"
if you just wrote something you really don't want to lose. You can
then close your browser, or browse elsewhere, come back, and pick up
where you left off.

> In Step 3, the content should be filtered (KSES, etc.) before saving.


> Step 5 demonstrates how this is better than using cookies. (One of
> many reasons.)

Agreed entirely.

> Step 6 can be via a JS confirm dialog but it might be more accessible
> and less obtrusive as a message box such as we use for published
> posts, saved options, etc.

I think that this would be the one major downfall, and is the thing
that I've hated about OpenOffice 2 since release, (although its not
quite fair, they're a desktop app). Instead of having some sort of
message that we detected an autosaved post, stick it as a draft, put
it up in the drafts area, and leave it be. Users will be able to see
that their post is there when they return, and the autosave feature
becomes useful for not only emergency saving.

--Robert Deaton

More information about the wp-hackers mailing list