As a Website developer, I often have to clear site cookies to test out my code. Easy to do in Chrome, but I need to also test things out in Safari on a Mac. In Safari, can I delete a single, specific Web site cookie or set of cookies, rather than the entire set of all cookies in the browser?
It’s smart to clear those cookies when you’re doing development because it’s too darn easy to forget and the changes you make to your code end up failing without you being able to figure out why. Oh, and the other gotcha that I’m sure you’ve already savvy to are browser caches. In the zeal to make your Web interaction as speedy as possible, modern Web browsers have a bad habit of using previously downloaded versions of images, CSS files, JavaScript files, etc. Bad news if you keep tweaking things.
You can delete the cache any time you want and all that happens is that the next time you visit sites the pages will load a bit more slowly. But just a bit.
Back to cookies. Yes, there is a way in Safari on Mac OS X to delete any cookies saved in the user’s browser session for just a specific domain or site. Let me show you…
First off, in Safari, choose “Preferences…” (or press Cmd-, if you like keyboard shortcuts). You’ll see a Preferences window with lots of options and the following row of icons:
The tab you want is “Privacy”. Click on it…
There’s more below this portion, but what you want is right on top. Don’t click on “Remove All Website Data…” however, because that’s the path to removing all cookies en masse, and as you can see, I have cookies in my own browser data set for almost 2000 sites. Your count will probably be lower if it’s not your primary browser, needless to say!
Instead, you want to click on “Details..”, which reveals a window with lots of sites listed:
Honestly, I don’t even know what most of these sites are. Probably would be a good idea to delete ’em all, but, again, a click on “Remove All” and every single cookie is zapped from every site I visit. Not good.
Instead, I’ll search on the specific domain name of the site whose cookies I want to remove. In this instance, it’s my own dad blog GoFatherhood. The search:
On the bottom of this window, there’s a button “Remove”. Click once on the matching site to select it, then click “Remove” to clear all the cookies. In this case, notice that I’ve cleared not only the cookies, but the cache and some local storage that the browser’s used to maximize performance.
So that’s the trick. Not too bad and quite fast once you know how to do it.