How to delete cookies for a specific site

95

16

I need a button or bookmarklet to delete the cookies from the current context. Clearing the cache would be another option.

Specifically, I am logged into too many Google sites and have multiple accounts active. If I log out, it logs everything out.

I want to delete the cookies for a given context (eg. on music.google.com, delete cookies for music.google.com but leave cookies for ever other site like accouts.google.com, thus refreshing the page prompts me for which account I'd like to use.

Colton

Posted 2011-12-09T22:22:33.057

Reputation: 1 063

Depending on how Google account logins work, that might not even be possible at all. – slhck – 2011-12-09T22:43:29.427

Yeah, I'm not fond of web development but I created wrote a bit of JavaScript to do it, but it didn't delete the header only cookies. I thought maybe extensions might have more control – Colton – 2011-12-10T19:46:46.967

Answers

124

  1. Click the document icon next to the URL.
  2. Click the "... from this site" link under the Cookies section. Google Chrome - site properties
  3. Highlight the cookie and choose Remove. You can also Block the whole site. Google Chrome - Cookies set by this page

Steve Tauber

Posted 2011-12-09T22:22:33.057

Reputation: 1 591

This is a fantastic tool as it also has other information about the domain and you can change the security from here. I'm glad Google has added something official for managing your data on a specific site. – Colton – 2015-01-11T04:06:35.317

Thank you! I had the same kind of problem, only not Chrome, but Firefox, and this tutorial has helped me to figure out what steps I should take in Firefox! – Cristiana Nicolae – 2017-02-21T00:07:35.470

20

You can do it through Chrome settings. Just go to Preferences -> Options -> Under the Hood -> Content settings -> All cookies and site data...

There you can filter single domain from the list and delete the ones you like.

aliz_bazar

Posted 2011-12-09T22:22:33.057

Reputation: 326

1Or just go to chrome://settings/siteData, the alternative to chrome://settings/clearBrowserData. – Pablo A – 2019-01-18T03:05:46.150

Preferences -> Options -> Under the Hood doesn't appear to be present in recent chrome versions. – drevicko – 2019-06-26T05:48:50.680

1This option is now unavailable. – Redsandro – 2013-04-02T20:06:49.480

5It's still available. After entering a domain name to filter, click the button, misleadingly named "Remove All". In reality it'll delete only filtered items. – Denis Malinovsky – 2013-06-18T02:48:00.083

9

The bookmarklet from http://ostermiller.org/bookmarklets/cookies.html should work without modification. Just visit the target website first

javascript:void((function(){var%20a,b,c,e,f;f=0;a=document.cookie.split(";%20");for(e=0;e<a.length&&a[e];e++){f++;for(b="."+location.host;b;b=b.replace(/^(?:%5C.|[^%5C.]+)/,"")){for(c=location.pathname;c;c=c.replace(/.$/,"")){document.cookie=(a[e]+";%20domain="+b+";%20path="+c+";%20expires="+new%20Date((new%20Date()).getTime()-1e11).toGMTString());}}}alert("Expired%20"+f+"%20cookies");})())

username

Posted 2011-12-09T22:22:33.057

Reputation: 1 178

1Per the documentation, it only clears cookes for THAT PAGE: "Clears all cookies for the current page." – Clay Nichols – 2012-12-28T20:06:18.467

3

In Chrome 60+ it's now in the dev tools (F12) - Application tab - Clear Site Data

Chuck D

Posted 2011-12-09T22:22:33.057

Reputation: 131

3

In Chrome 63, you can open this page and get sites listed separately:

chrome://settings/siteData

Just pick the site you're interested in and you'll see all cookies (or other artifacts like cache, localstorage, etc.). Way easier than navigating various menus ;)

Please note that the above URL is bookmarkable, which means, you can either bookmark the above URL or even bookmark an individual page like this:

chrome://settings/cookies/detail?site=accounts.google.com

After that, you can use whatever method or extension you want to trigger the bookmark (menu, bookmark toolbar, etc.).

Istvan Devai

Posted 2011-12-09T22:22:33.057

Reputation: 131

2

  1. Install Web Developer extension (Chrome , Firefox , Opera)
  2. go to cookies tab -> Delete Domain Cookies like below screenshot

web-developer addon delete cookie extension

Iman Abidi

Posted 2011-12-09T22:22:33.057

Reputation: 483

1

I found a good and easy to use extension for the same. Remove cookies for site.

Its description:

DESCRIPTION:
Click the broken cookie and all cookies for the current site will be deleted.

I built this extension because it was simply missing. As a developer I need a quick way to clean all cookies for the current site.

hims056

Posted 2011-12-09T22:22:33.057

Reputation: 125

1

In Mozilla Firefox, I would follow these steps.

  1. Click the lock/security icon next to the URL
  2. Select 'More information'. On the securities tab, click on 'view cookies'.
  3. Select the cookies to delete, and use 'remove selected cookies' option. Or you could simply use 'remove all cookies' (which is matching the current URL).

For detailed steps (not the one above),

See Firefox documentation

This stackoverflow question

AIB

Posted 2011-12-09T22:22:33.057

Reputation: 521