Use browser cookies to find visited sites

Nov 26, '04 08:51:00AM

Contributed by: gw

A month or so ago I was browsing (using Safari and Google) for a french poster that I was going to buy as a Christmas present -- I found it, but having weeks to go, did not commit to the purchase, and then committed a cardinal sin. I neither saved the bookmark nor wrote down the key attributes of the picture that had resulted from hours of searching. Of course, I then went to find it tonight and couldn't -- Safari history is two weeks, and the google dropdown had cleared! How I wished I'd used a9 or Firefox, but no!

So the hint ... most sites are gregarious and will cookie you just to remember you. So I found the ~/Library/Cookies/Cookies.plist file and although I loaded it up in the Property List Editor program, it was structured such that the sites that created my 1,200+ cookies couldn't quickly be read. So I resorted to grep poster Cookies.plist (from within the directory in the Terminal). This got me a list of the 12 sites with 'poster' in the name that I'd ever visited. From there, I quickly found my previous shopping experience (I had saved a cart).

Of course, opening this file in any reasonable text editor -- TextEdit, vi, emacs, or even a repetitive search in Property List Editor would work, but grep was suitably quick and dirty.

Not really a big hint, but worth sharing for novices to the Unix world...

Comments (5)

Mac OS X Hints