Skip to content

Force Session Cookies on Chrome for Mac

Google Chrome icon

I just downloaded the new Google Chrome for Mac beta. I like to clear out my cookies after each time I quit the browser, so tracking information and so on doesn’t hang around any longer than it needs to.

On Google Chrome for Mac, there is no built-in setting to force all cookies to be session cookies, but you can use this hack to achieve the same thing. After launching Chrome at least once, then quit it and run the following commands in Terminal:

rm "~/Library/Application Support/Google/Chrome/Default/Cookies"
ln -s /dev/null "~/Library/Application Support/Google/Chrome/Default/Cookies"

The first command deletes the cookies file and the second command creates a symbolic link, so that anything dropped in the cookies file goes to /dev/null (i.e. the cookies gets deleted and not stored once you quit!)

UPDATE 2010-01-29: JeanVal reports in the comments that this process works on Chrome for Linux too. The Cookies file is stored at the path ~/.config/chromium, so just adjust the commands above to fit that path.

Like this post?

If you would like to support the time and effort I have put into my tutorials and writing, please consider making a donation.

2 Comments

  1. Dietmar wrote:

    Thanks a lot! 🙂

    Tuesday, December 8, 2009 at 18:30 | Permalink | Using Mozilla Firefox Mozilla Firefox 3.5.5 on Mac OS X Mac OS X 10
  2. JeanVal wrote:

    Works great under linux too…
    here the correct path was ~/.config/chromium/

    This thing was (for me) the #1 issue with this browser.

    Friday, January 29, 2010 at 13:01 | Permalink | Using Google Chrome Google Chrome 4.0.266.0 on Linux Linux

Post a Comment

On some sites, you must be logged in to post a comment. This is not the case on this site.
Your email address is not made public or shared. Required fields are marked with *.
*
*
*

Posting a comment signifies you accept the privacy policy.
Please note — usually your comment will appear straight away but sometimes it will be held for approval (this is due to the spam filter). If your comment is waiting to be approved, please don’t post it again! It will appear eventually.