For those of you who were too busy petting their Meerkats to look at their RSS aggregators yesterday — OK, it's really an O'Reilly insider joke here —, let me say that our editor, Derrick Story, published a blog on Safari and his personal experiences with the application.
This got me thinking about our beloved browser, currently battling in my Dock for its status of default browser — a status I change more often than socks, for testing purposes and just the kicks I get from using pop-up menus.
It turns out there is one feature out there I would really, really love to see added and its notable absence from all browsers out there is something I can't really understand. Those of us who routinely develop web sites and applications know how important it is to clear (1) caches, (2) cookies, (3) favicons and (4) history between every test lest we want to run into inexplicable behavior — and this with every browser.
The problem is that there is no way to do that that does not involve a clicking and dialog-dismissing extravaganza. Fun, fun… We have a reset Safari menu but it also clears Keychain auto-fills and that is a sanity-threatening proposition — ever worked on beta sites with 2 layers of (purely useless because non-encrypted) password protection? Using private browsing might be a workaround but it does not provide the same level of confidence-inducing foamy scrubbing I need to perform about 50 times a day.
So, what is a poor little FJ to do? Whip up AppleScript, that is! Thanks to the magic of "do shell script" commands and "rm" handlers, I now have a "Reset Safari" option that just fits my needs.
I have never loved my Scripts menu as much! If the people in Cupertino who came up with the idea could send me their address, I would gladly express a box of French cookies to them! (Oh, the same applies to the WebKit and Safari teams, by the way, who are doing a superb work with the browser, even if the very little specific feature I have in mind is not available.)
Update: I have added, as requested, the script below. Please consider it uses "rm" commands and is only in alpha stage -- it works on my little machine but I did not test on a larger scale. All disclaimers apply: use at your own risk and, please, backup your data! As they say, it comes with no warranty whatsoever, expressed or implied.
FJ de Kermadec is an author, stylist and entrepreneur in Paris, France.
oreillynet.com Copyright © 2006 O'Reilly Media, Inc.