JavaScript cookies and cream
Here’s a thought to throw out to all that read
I’m sure almost everyone nowadays have used Microsoft Word and have witnessed their sometimes useful “Auto Save” functionality.
Well, I just had a quick idea that juts came to mind.
Using JavaScript one can replicate a similar type of feature through the usage of either persisting the data server side through something like Ajax, or just create a cookie in JavaScript to store this text entry. (Reference on using Cookies in JavaScript via Quirksmode.org)
You can use something like setTimeout(“function()”,time) in your JavaScript to call a function to periodically save the user data and say if the user doesn’t click the “save”/”cancel” button, the next time the user visits you can ask the user if he/she would like to use or delete the previous unsaved data again.
This idea came about because it seems common for users to accidentally close their browser window or go back a page in the browsers’ history. Or even if they click a link in another program such as Outlook and the link opens in that exact window they were writing stuff in your web app! (The whole persist on server side via Ajax is a good idea becaues it can be stored for longer than a cookie.)
Sounds oh so simple.
If anyone uses the idea, leave a comment, I’d like to know how people go with this one.