0

Chrome doesn't seem to clear session cookies when I close my browser. I don't particularly mind this, but sometimes (particularly when testing something), it's useful to be able to clear them out.

Is there a relatively easy way to clear just the session cookies? Ideally I'd be able to do it just for a particular site, but if there's a simple way to clear session cookies for the whole browser instance I'd be fine with that too.

0

3 Answers 3

1

You could go to Settings > Show advanced settings > Contents settings > All cookies and site data > then search for your site and individually delete all the cookies that show up in the search. enter image description here

Or you could also use an extension like Edit this cookie for more granular control.


EDIT: The easiest way I can think of is to click the "View Site Info" button next to the refresh button, click "Show cookies and site data", navigate to the cookie you want to remove and click "Remove".

The following snap might help: enter image description here

5
  • Yeah, deleting cookies is fairly easy, but then I have to manually determine which are session cookies and delete those. Is that really the easiest way? It's what I've been doing so far, but I was really hoping there was something easier. May 19, 2014 at 13:26
  • @Jun-DaiBates-Kobashigawa See edit.
    – Shazvi
    May 19, 2014 at 15:28
  • Unless there's a way to filter or sort session cookies, that doesn't really change anything, right? May 19, 2014 at 16:17
  • @Jun-DaiBates-Kobashigawa Not quite sure what you mean. All you have to do is find the cookie name that holds session data and delete it. If you're referring to session variables($_SESSION in php), those don't actually reside on the client's browser, they are only stored on the server. This might explain it better.
    – Shazvi
    May 19, 2014 at 17:03
  • My point is that I want to clear all cookies that are marked as session cookies to see the behaviour when the browser considers the session as having expired. In general when I do this today, I have to use Firefox or Safari, but it'd be nice if I could just do it in Chrome without manually going through the cookies. May 19, 2014 at 17:56
0

Incognito/Privacy Mode works wonders when I'm doing login or cookie based testing.

Close and reopen into another Incognito window and the cookies and cache are now empty.

1
  • That's great, and I use it all the time too. The problem, though, is that all the cookies are gone, which is useless when I'm trying to test behaviour for scenarios when only the session cookies are cleared. May 19, 2014 at 13:27
0

In Chrome go to the web page. Hit F12. Click the resources tab at the top. On the left you will see a tree with boxes for Local Storage, Cookies, Session storage. Click into them. If there are any they will show on the right. Right click on whatever shows up on the right and select delete.

Done.

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