views:

267

answers:

7

Is there a way to recover the contents of a browser textarea? Say, you've typed a long post and then accidentally clicked on a link. Then when you come back, the textfields tantalizingly retain the text you typed in, but the textarea is blank. Where does IE and Firefox store the stuff that prepopulates? Can textareas be brought back?

+1  A: 

Whenever I type something really long, I always copy it to my clipboard before submitting the form in case something happens. Or, sometimes I type it in Notepad and copy it over when I'm done. That may not be the answer you're looking for, but it might help.

VirtuosiMedia
A: 

This is partly dependent on the browsers. I know in some cases the text fields are still there.. The difference seems to be related the connection being HTTPS or not.

If you are the developer for the site in question you could do some kind of ajax auto-save periodically to help the users.

Zoredache
+1  A: 

There's a Greasemonkey script that automatically backs up textareas, but as far as I know browsers just store the text in memory and do not write it to disk.

John Millikin
A: 

As far as I know, it's gone. If the browser had it stashed somewhere, it would have kept it in the textarea when you returned. To work around this problem, you could:

  • Install a keylogger on your own machine (probably a bad idea)
  • Write a Firefox plug-in to actually cache this data somewhere recoverable (maybe we can ask StackOverflow how do accomplish that.)
  • As VirtuosiMedia suggested, compose it somewhere else and then paste it into the browser when you're done.
Adam Bellaire
+1  A: 

One thing you could try (although I haven't tried it, so I can't say how effective this method would be) to immediately try to search the memory space of the browser for the text - maybe it was not deallocated, or even if it was deallocated, maybe it wasn't overwritten by other data.

You can do this on Windows for example with with the HXD Hex Editor, which can open the address space of other processes and you can use to search for strings.

A final note: you should also try to search for Unicode variants of the strings, since it is entirely possible that the browser keeps it internally as Unicode.

Cd-MaN
A: 

If you develop the site you could add an onblur event to store the data (ajax, cookies) in time and check on loading the page if there was previous typed text.

Overbeeke
+1  A: 

Altough this is not a fix for your problem to which I can only suggest to scan the memory and look for some part of the text, there is this extension for Firefox that maybe can prevent future situations of lost text.

https://addons.mozilla.org/en-US/firefox/addon/5761

description from the page:

This extension will save automatically the content in textarea on pages when user is typing. User can recover the saved texts in the cache window, even the tab or the window is closed unexpectedly.

The user will see an icon in status bar when the text is saved in the cache. Clicking the icon to open the cache window.

It would be useful to add the Textarea Cache button in toolbar. This button can help the user for advanced settings or to opening the cache window.

dawez