How can I keep persistent cookies from certain domains only?

3

This question is similar this one which covers Firefox, but I want to know how to do it in Chrome:

I want Chrome to clear cookies from all sites accept those from certain domains. In the Cookies section of the **Content Settings* I've made following selections:

(*) Allow local data to be set (recommended)
( ) Allow local data to be set for the current session only
( ) Block sites from setting any data
[ ] Block third-party cookies and site data
[x] Clear cookies and other sites and plug-in data when I close my browser

After logged in to my preferred website(s), I find the required domains listed when I click at All cookies and site data. Let's say, I find some cookies for mysite.comand www.mysite.com. Now I click at Manage exceptions and enter these items:

Hostname Pattern                   Behavior
-------------------------------------------
mysite.com                         Allow
www.mysite.com                     Allow

Unfortunately, this does not seem to work, because when I close Chrome and reopen it, all cookies are gone, even those from the configured mysite.com hosts.

Mike L.

Posted 2012-04-03T18:51:50.267

Reputation: 4 539

possible duplicate of How to automaticaly delete all cookies BUT cookies from specific white-listed websites in Chrome?

– Ƭᴇcʜιᴇ007 – 2014-10-10T20:24:31.153

Answers

2

I couldn't find a way to do what you want without extensions, and ended up installing Vanilla Cookie Manager extension (I cannot see its page today, but if you search for it, it shows at the top).

Once you configure it, it adds a small icon to your address bar that allows you to quickly add the current site to a whitelist.

Dysaster

Posted 2012-04-03T18:51:50.267

Reputation: 321

4

From Chrome's help docs, you need to prepend the domain name with [*.]domain.com to match all subdomains (which includes www). So for your example:

Hostname Pattern                   Behavior
-------------------------------------------
[*.]mysite.com                     Allow

Naveen M.

Posted 2012-04-03T18:51:50.267

Reputation: 41