Yesterday @katiecupcake was creating a blog for her design team (@cartwheelsart), when Safari decided to crash on her. Supposedly TypePad will auto-save your posts every 15 seconds (according to a blog post from 2008); however, for some reason this post was not auto-saved and in turn she lost nearly two hours of time that she had invested into a grueling how-to tutorial for a crochet pattern.

To say that Katie was distraught and frustrated would be an understatement. Rather than make her recreate it all I pulled up my sleeves and got to work. I knew that there was a good possibility that somehow that data had been saved by the browser before it crashed. I came across several “Mac tips” that all explained how Safari automatically saved your textarea inputs pretty frequently in the ~/Library/Caches/Safari folder. Unfortunately they were from OS X 10.4 or 10.5 and it has changed at some point. I was able to locate the Safari cache file at: ~/Library/Caches/com.apple.Safari/Cache.db.

Sadly the format of the cached files was no longer static HTML. This meant that I had to identify the database type (I went off my gut and guessed it was SQLite3). It turns out that that is correct, but that also meant my normal database tools were of little use to me. I did some more Googling and quickly discovered SafariCacheExplorer. SafariCacheExplorer allows you to quickly filter / identify your cached pages from Safari for only $10. You can do extractions of your data as images, webpages, or plain text.

I quickly loaded the TypePad site and looked at the URL structure for a new post. I then entered the basic portions of that URL into SafariCacheExplorer which presented me with only 3 results. It only took a matter of seconds to see which file was the largest, extract it, and take it in to a completely asleep Katie. Obviously she was thrilled about not having to recreate hours of work. It only took me about 15 minutes from the initial idea to finding the data. I can definitely say that SafariCacheExplorer was definitely worth every penny!

Comments