3

It seems as though extensions in Safari can't access cookies. In firefox there is a great add-on that immediately deletes cookies from a site after you close its tab. This is really helpful for viewing sites that require cookies, but that you don't want following you all over the internet.

Is there any approach I could take to mimic this behavior in Safari? I was thinking some sort of watcher on the cookie folder or linking it to /dev/null/, but I'd still like to whitelist some cookies that I don't mind keeping around and I wouldn't want to add much cpu or battery usage either.

1
  • Have you looked at the NSHTTPCookieStorage documentation? Perhaps you could create a small program based on this API.
    – aaplmath
    Aug 25, 2015 at 22:53

2 Answers 2

5
+50

If you open Safari in private browsing mode, all cookies you may have are not accessible. Feel free to log in to whatever site you want and the cookies only persist for that session as you are familiar with from Firefox.

If you want to script a periodic purging of all cookies, that is trivial if you use Automator to record the action of launching safari, selecting preferences and selecting the clear all cookies button.

That's probably overkill, since private browsing does about all you ask already.

1
  • The add-on flexibility is nice, but I think between private browsing or writing an Automator action this should cover it. Thanks for the help.
    – Gregg B
    Sep 1, 2015 at 16:13
1
  1. There exists a paid app for that on the Mac App Store: https://itunes.apple.com/us/app/cookie-5/id1048338802

    It covers periodic and on-exit clearing of cookies as well.

    [No affiliation, I'm just a user.]

  2. There is also an open source solution to manage cookies, though it's not maintained anymore and — according the README notice — it doesn't support El Capitan: https://github.com/nickzman/safaricookiecutter

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .