Textarea Cache

Have you ever typed a long, insightful blog post or comment and immediately lost it because you accidentally hit the wrong button? I do that all the time! I can’t tell you how often have I lost a good hour of work just because of hitting the wrong button at the wrong time. That’s the problem with writing inside of a browser – you can’t always undo your mistakes, and you can’t always save your work.

It used to be much worse in the past. These days there are many fail-safes that can often prevent you from losing your work. Firefox for example will restore your text area contents if you accidentally close the browser window and/or tab. This is great but of course won’t help you in all circumstances. There are quite a few things you can do to foil this feature and still lose your meticulously typed text. Let me count the ways to fuck yourself over in Firefox:

  1. Hitting refresh
  2. Hitting the back button
  3. Accidentally clicking on some link
  4. Hitting backspace when textarea is not in focus (works like back button)
  5. Closing the browser while having it set to purge session data on close

Web application developers know this and they have started building their own counter measures to prevent it from happening. For example, WordPress will automagically save your posts as you type them. Unless of course you leave it unattended for a little while.

This actually happened to me recently – I was typing up a post, and had to leave my desk for a bit. I forgot to hit the save button but that wasn’t a grievous mistake because the auto save feature kicked in anyway. When I came back, I finished the post, proof read it, corrected mistakes, rephrased couple of sentences and finally hit the save button… Only to have WordPress notify me that I need to log back in.

Some applications try to save the data from a previous POST request as you log in. WordPress does not do that. When I got back to my post draft, I realized that the last copy was the auto save from about an hour ago.

This annoyed the shit out of me. I mean, seriously – we know that stuff like that happens all the time. Why can’t we just cache the textarea contents somewhere as you type? Yes, saving everything you type would be a privacy concern but you could make it an optional feature that has to be enabled, and set the browser to purge anything that has not been touched in say two days of active browser use.

In fact, I’m using Firefox. There should be a plugin for something like that for fucks’ sake!

So on the off chance I typed “textarea cache plugin firefox” into Google and voilà: there is one.

It does exactly what you would think – it caches everything you type into a textarea fields and purges old entries on some sort of schedule. It puts a tiny button into the status bar, and pressing it will open the currently active cache and a list of other saved buffers. You can purge any and all of them at will using that very same interface.

I had no clue this thing existed, but now I don’t know how can this not be a part of the core browser. I highly recommend checking it out.

This entry was posted in Uncategorized. Bookmark the permalink.



15 Responses to Textarea Cache

  1. Tino UNITED STATES Mozilla Firefox Ubuntu Linux Terminalist says:

    I feel your pain. I used to do this all the time, especially back when there were even less safeguards and anything except a non-problematic, non-timeout, error-free submit meant “by the way, all your work is gone now”. My favourite is the introduction of the side-button on mice that defaults to ‘back’ in the Browser. That is virtually a “One-click work nuker” conveniently placed just under your thumb. Its like the far-side cartoon with a guy sitting an an air plane with a ‘wings fall off’ button next to the seat adjustment button…

    Reply  |  Quote
  2. road UNITED STATES Mozilla Firefox Windows says:

    this is great. for years I’ve been in the habit of hitting select-all > copy (ctrl-a, ctrl-c) before submitting any lengthy e-mail/blog-post via the web just in case i was logged out due to inactivity or something, but this is much smarter. thanks for the tip.

    Reply  |  Quote
  3. one problem is that a massive amount of software doesnt use a normal textarea-tag… one of it is the rich-text-editor of wordpress (although you still got the plaintext-editor where you can write your own html.. but who does that? …other than me)

    But if you really want to avoid such things then you should take a look at the “it’s all text”-extension for firefox. It does just a simple thing… it shows a button near every textbox that launches your favourite text-editor and opens the current text in this. For that this text is saved in your editor and in a temporary file on your harddrive.
    So not even you will get a much better interface (syntax-highlighting any1?), you will never loose your text again.

    Only Problem for me at the moment: i don’t use Firefox… :-/

    Reply  |  Quote
  4. whoops.. i think it would be better to ignore about the half of my last comment.
    About everything besides “take a look at its all text if you want”

    :-)

    Reply  |  Quote
  5. IceBrain PORTUGAL Mozilla Firefox Debian GNU/Linux Terminalist says:

    I usually use Its All Text! and edit long texts in gvim, so I don’t experience that pain.

    Reply  |  Quote
  6. Luke Maciak UNITED STATES Mozilla Firefox Windows Terminalist says:

    Btw, It’s All Text is old news guys. I actually posted about it last year or so. :)

    I do use it for some longer posts, but not always because when I’m in the editor I can’t do things like add images, or use the quick-tags to do lazy stuff like making links or lists.

    Dr. Azrael Tod wrote:

    one problem is that a massive amount of software doesnt use a normal textarea-tag… one of it is the rich-text-editor of wordpress (although you still got the plaintext-editor where you can write your own html.. but who does that? …other than me)

    Oh yeah… I forgot that feature even existed. I hate that damn thing. My WordPress was set to use the traditional text only mode ever since I installed it.

    Well, people who use WYSIWYG to compose wordpress posts deserve to lose their work when they hit the wrong button. ;P

    Reply  |  Quote
  7. Alphast NETHERLANDS Mozilla Firefox Windows Terminalist says:

    Well, great post and useful link. I am downloading it right now (for info, I am in charge of updating some Wiki stuff at work and it’s in Zoho Wiki, which is quite prone to losing bits of stuff randomly (apart from being a great piece of software).

    Reply  |  Quote
  8. Alphast NETHERLANDS Mozilla Firefox Windows Terminalist says:

    Meeehhh. Double brackets… I should proof-read what I type from time to time. ;-)

    Reply  |  Quote
  9. copperfish Opera Linux Terminalist says:

    It’s a great Firefox plugin. I’ve been trying to use different browsers lately (first Chrome and now Opera) and it seems Opera doesn’t have an equivalent setting.

    I do notice with Opera (even using a custom http://pgl.yoyo.org/adservers/ hosts file) that there are ads on your site! With Firefox and Chrome I never noticed. Firefox because of Adblock Plus and Chrome because Chrome in Linux doesn’t do Flash yet (not by default anyway).

    I’m happy to disable the filter for your site in future. I’m imagining the ads help with hosting a little. But the really help make the site look ugly ;)

    Reply  |  Quote
  10. copperfish Opera Linux Terminalist says:

    @ copperfish:
    I mean’t “they really” not “the really”.

    Reply  |  Quote
  11. copperfish Opera Linux Terminalist says:

    @ copperfish:
    Aaaaargh! mean’t *doh*

    Reply  |  Quote
  12. Luke Maciak UNITED STATES Mozilla Firefox Ubuntu Linux Terminalist says:

    @ copperfish:
    Looks like I really need to locate a decent comment edit plugin. :)

    Reply  |  Quote
  13. Alphast NETHERLANDS Mozilla Firefox Windows Terminalist says:

    Yes, that would be nice. I think we have only to blame ourselves, of course, but it would be some nice added value to your blog… ;-)

    Reply  |  Quote
  14. @ Luke Maciak:
    that would be of great help

    Reply  |  Quote
  15. Mackattack UNITED KINGDOM Safari Mac OS says:

    Or you could use copy and paste before hitting any buttons.

    http://www.protagonistknight.blogspot.com

    Reply  |  Quote

Leave a Reply

Your email address will not be published. Required fields are marked *