25 replies on “Blogging Autosave”
I guess it would be cool.
yup. it’s a much better approach than the js that autoloads in the background. you might even want to add it as a default in wp.
I find the “Save and continue editing” button to be good enough. Isn’t saving often a basic computer usage guideline?
I think It would be cool :). The deleted posts could go in a DB table and you can recover them with a couple of clicks via WP admin CP.
Isn’t eating right, getting lots of exercise, drinking moderately and not smoking a basic life guideline? 😛
You might want to check with the guys at Frassle to see how they’re implementing their auto-save feature.
It costs us next to nothing to save all the time, so why not? It’ll be worth it that one time you lose a post, I know I’ve lost tons of stuff even though I know better to save more often.
It saves the contents of a text field as a cookie using a “title field” as part of the cookie “key”. It also lists all the keys it has saved too.
I volunteer to test it…if there’s one person that I know who can break stuff, it’s me. Let’s do it. Now.
…dreaming of learning how to code…
I would prefer a save as draft for ‘pages’ before this. It’s kinda annoying how it’s always an insta-publish with these documents.
From my understanding, “Pages” are just posts with their “status” set to “page”. This means to have drafts for pages you’d need to add “Page Draft” to the list of status options – not a bit deal, but could break a number of things.
I briefly played with a form-save feature that kicked-in on the unLoad event. It just serialized all the form fields and dumped them to a cookie. Then, when you returned to the page, it spawned a little link asking if you’d like to repopulate. *searches for the code*
30-second autosave would be pretty sweet, though.
Auto-save would be a welcome idea!
Tim, that would make me nervous. I sort of take comfort knowing that when I save a post, lightning could strike my computer, and my post would be safe. Of course, it would be really cool if we used AJAX to “Save and Continue Editing,” so I like the general “don’t have to reload” concept.
One limit that I can forsee is the 4KB per cookie limit. For that reason, tend to think an AJAX/MySQL method might be more reliable.
The only thing about cookies is what if somehow your browser window gets closed and the cookes all get cleared. This has happened in Firefox to me.
I do foresee an ‘AutoSave’ section in the WordPress options in the future though with a customizable time limit for autosaving.
Hmmm… that seems like a productive way to spend an afternoon. I’ll have a look at doing that.
And why are we not just inplementing this with AJAX and a timer function? I have the timer bit done on an autosave plugin for WP, I just haven’t gotten around to creating the AJAX bit yet.
Might have to now.
Your timing, as ever, is impeccable:
Chris – AJAX would make sense for general saving, but for an auto-save its a bit much, especially as you’d be saving after every keystroke or word. You’d be slamming your server with requests that are… well.. pointless.
Plus it would eat bandwidth, not by much, but it would. Also this means that if I want to save it to a draft manually (good from a UI point of view) then I can specifically press a button. Just like an auto save doesn’t save into the same file you wouldn’t want to be overwriting all you did before.
Timer’s aren’t really the best solution either. Ideally you’d capture a keypress, or just the space and full stop.
I’ve got this working as a plugin, ish.. its cludgy atm, but I’ll tidy it up when I get back from work and post it up when I’m done.
looking forward to what Gregory is going to post
especially as you’d be saving after every keystroke or word.
No no, only save every X seconds (30 would be fine) IF the post is Y (say 50) characters longer/shorter than it was last. That would work great as an AJAX implementation. In fact, it could quite easily be done with a plugin that just shoves the JS into the wp_head() call.
Have the JS create a “fake” post request and send it to the server. The only big issue is that there isn’t a simple “update-post.php” as far as I know. You might have to make the plugin do it manually since when you update a post in WP normally, it’s a big deal processing the whole post-edit page and returning a huge pile of results.
Wait, isn’t there some kind of XML interface that could be used for this as well? Hrm…
I’ve just finished writing a long entr about having to work on a good Friday. When I clicked “publish,” was a the next page was blank. Must be a server error or due to my dialup connection. Whatever the case was, I could only wish WP had an autosave feature like that of Gmail. :p