Do not restart your browser or press the back button!
On Linux:
This solution is hit or miss, and works on Linux. In short: dump the memory of the Firefox process, and search through it for fragments of your text. It's ugly, but it's your last resort.
First, dump core using the gcore
utility, which requires gdb (the GNU debugger) to be installed:
$ ps -e | grep firefox
7089 ? 00:02:23 firefox
$ gcore 7089
[New Thread 0xa8ffeb70 (LWP 8924)]
[New Thread 0xb25feb70 (LWP 8531)]
[New Thread 0x9d7feb70 (LWP 8527)]
... snip ...
[New Thread 0xb5ffeb70 (LWP 7099)]
[New Thread 0xb67ffb70 (LWP 7098)]
[New Thread 0xb72f8b70 (LWP 7097)]
Saved corefile core.7089
Note that a core dump may take several hundred megabytes of disk space.
If it succeeded, you can now breathe a sigh of relief. If your text was lingering in memory by chance, it has been captured in the core dump.
Now, try to remember a phrase from your essay (for example, "a profound effect"), and use grep
to see if it's present in the document:
$ grep 'a profound effect' core.7089
Binary file core.7089 matches
If you get "Binary file ... matches", good, it's there! If not, try more phrases. If all of your grep
attempts produce empty output, then your essay is probably gone forever, and there is nothing you can do about it. (You can try grep -R 'a profound effect' ~/.mozilla
, but I doubt it will work)
Assuming you do get a match, the next task will be to slice out pieces of the core dump containing the text you're looking for, and use less
to look at it visually:
$ grep -B 20 -A 20 -a 'a profound effect' core.7089 > /tmp/out
$ less /tmp/out
(You could omit the first line and just say less core.7089
, but I've found that less
tends to blow up in memory usage when searching through such a large binary file.)
Now, type /a profound effect
, hit enter, wait, and page down until you see something recognizable:
Bam! If you don't like this result, see if there are any others by typing 'n'. Also, be sure to proofread the garbage so you don't end up posting:
my mind will often generate mush express ideas in that language.
I imagine it gets clobbered like this because the memory holding your essay fragments is no longer allocated and gets trampled by subsequent allocations.
On Windows:
The procedure is the same. First, create a core dump of Firefox. This can be accomplished in the Task Manager. In English, the menu entry is Create Dump File.
Dumping takes a few seconds.
Then, use a hex editor like http://mh-nexus.de/en/hxd/ to open the dump, and search for the lost text.
1http://superuser.com/questions/512669/does-firefox-cache-submitted-form-content-anywhere-i-can-recover is relevant and provided a working solution for me via the Web Developer tools technique. – pbhj – 2015-04-07T22:15:22.793
1I think you've answered your own question here... – John T – 2011-01-22T09:03:59.330
2@John T: Indeed. I'm just creating Google fodder for others with the same problem, but if anyone has any better suggestions, they are certainly welcome. – Joey Adams – 2011-01-22T09:16:37.430
8This is not an exact duplicate. The referenced question's top answers require installing a plugin, which does not help the user if they already lost the form. – Joey Adams – 2012-04-30T02:15:17.430
I have run into the same situation. A solution would be very nice. **Even against future form data loss**, I am also looking for a solution. Lazarus is promising, but he has the slight weakness of not working at all.
– Nicolas Barbulesco – 2014-04-15T10:07:25.057