File Juicer Has Your Back
Earlier this week while working on a group project with a server we all shared, a relatively large CSS file was accidentally overwritten. We had been coding non-stop for a few days and hadn't backed anything up. It would have been a major setback considering our project was due soon. Fortunately after a few minutes of ferocious searching, I came up with a few possible paths to remedy this situation.
First off, it's important to note that I had visited the site we were developing in both Firefox and Safari previously so both should have the CSS file in the cache. My first tactic was to tinker around with Firefox's about:cache address bar command. With that I was able to find a list of all the cached files Firefox had, and even saw the file I was looking for. Unfortunately, I could not find an actual way to get that file out. Delving into the folder where Firefox's cache is stored only turns up proprietary cache files.
Abandoning the Firefox method, I started looking at where Safari stores its cache files. Unfortunately they were also in a proprietary format, *.cache. It started to seem like I might as well just start rewriting the CSS file - then I found File Juicer. File Juicer is a shareware OS X application that does many things - including restoring files from browser caches. It supports Safari, Camino, Firefox and Mozilla - maybe even more but those are just the browsers installed on my machine.
All you need to do to run File Juicer is execute File » Browser Cache » <browser>. After a few seconds for processing these files, File Juicer presents you with a "Juice" folder with each file from the browser cache organized by file type.
The next time you have one of those "oh shit" moments with web development, keep File Juicer in mind. Of course, if you happen to lose or overwrite a file processed on the server-side, like PHP, you're out of luck.