Autosaving
I think if there's one thing website users take for granted, it's the fact that browsers crash and that data must be "lost."
For example, let's say I am posting an entry to my Tabulas using this crappy old control panel. What if I were to accidentally close my browser? I know that if this happened to me a few weeks ago, I would have cursed my stupidity, but I never would have blamed the site.
It occured to me yesterday that it really shouldn't be that hard for autosave functions to be built into websites; especially sites like Tabulas where people have a tendency to write longer entries. Imagine the JOY of a user if they were writing, their browser/computer crashed, they cursed, they signed online, and saw... the entry still in their browser! I have yet to lose an entry due to browser crashes (knock on silicon), but I have lost huge amounts of text on other sites (LJ back when they had no servers; this is pre-Tabulas)
Technically, I don't think it would be horribly difficult to pull off.
On the backend, you would have a receiving script that would accept two values: username and the entry. The backend script, whenever it receives any information, would create a temp file (maybe something like /tmp/roy.txt).
On the entry page itself, there would be a JS script that would listen. The idea is *not* to add any type of user-oriented actions; I want to limit the number of buttons displayed to the user, so having a 'save' button is not what I want. I'm thinking of just having a JS function count the number of keypresses on a given textarea, and execute a XMLOverHttp request for every 128 keypresses (or 256). So basically every 128 characters you typed, the site would take that data and save it to some backend without you knowing! When you hit 'submit,' the site would delete your temp file. So the idea is if you accidentally leave or your computer crashes, the site has a somewhat fresh copy of whatever you last typed. Of course, if you opened up for a new entry and the site detected a temp file in existence, it would automatically fill out your textarea with that entry.
I'm not sure how memory-intensive it would get on the client side (wouldn't be anything more than a simple onkeypress and storing a counter), but it would definitely be lightweight on the server side (no db hits; just a simple receive and dump it into a text file).
Food for thought.
Comment with Facebook
Want to comment with Tabulas?. Please login.
jackson (guest)
roy
ree
forceofwill
Is there any way to make the text transferable from the basic editor to the advanced and vice versa? It sounds like you could just implement the autosave to save when the "change editor type" button is pressed and then have it appear in the other editor.
roy
Leedar
HK1997
roy
HK1997
roy