[wp-hackers] Autosave

Andy Skelton skeltoac at gmail.com
Mon Jan 2 05:31:07 GMT 2006

As long as it's a hot topic, let's give it a proper subject and proper

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

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.

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.)

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.

Your ideas?


More information about the wp-hackers mailing list