IE doesn't actually delete the cookies

2019-03-17 21:42发布

问题:

Pressing Ctrl+Shift+Del brings up the deletion dialog in almost all browsers (I've tested IE, Firefox, and Chrome), where you can delete cookies, form data, passwords, etc.

Firefox, and Chrome are working just fine. However, IE just like always acts differently. It shows the message that everything is deleted, but it actually preserves many things.

To test it, I simply log into a website, so that its authentication cookie is set on my browser. Then I delete all cookies. Then I request a private page of that site (which would be served to logged in users only). Guess what? In Chrome and Firefox I get redirected to login page, but in IE, I'm still logged in.

Any ideas?

回答1:

I had the same problem in IE9, where clearing browser cache and cookies would not actually delete the login cookie for my site. I finally resolved it by unchecking the first option in the dialog along with the cookies option (Preserve Favorites website data). (I'd include an image, but I'm new...)



回答2:

There are two types of cookies: session and persistent. In your case, session cookies should be considered.

In IE 9 when you use Ctrl+Shift+Del option, you delete only persistent cookies.
If you want to delete session one, you must hit F12 to open the Developer Tools, click Cache and Delete session cookie



回答3:

I assume your Authentication cookie is a session cookie. That will be deleted when the browser closes, and is typically stored in memory only. Since it's already that private, it makes little sense (from a privacy viewpoint) to delete it even quicker.

Now, some browsers may still delete it early. When they happen to have a unified cookie store, it's easier to just delete all cookies. But for browsers that handle session cookies separately, there's no good reason to duplicate the cookie deletion logic.



回答4:

First, close all IE windows and tabs, then open the "Internet Options" from the Control Panel, delete the cookies from there.

Also, as Chuck said, do not forget to uncheck the first option in the dialog along with the cookies option (Preserve Favorites website data).

You could also keep this window open to see the results of deleting procee : C:\Users\USERNAME\AppData\Roaming\Microsoft\Windows\Cookies (ie 11)