Friday, 15 February 2019

Chrome's "Clear Browsing Data" does not clear cookies for open incognito tabs?


Here's something I don't understand about Chrome, about cookies, or about the relevant standards.


I open a fresh Chrome (31.0.1650.63 m on Windows 7), no previously kept tabs ("Continue where I left off" is off), no cookies.




  • I open an incognito window, and go to a site S which sets a cookie X, as shown on the 'Resources' tab of Chrome's DevTools.




  • Now I open a new incognito tab 2, and close the original incognito tab 1. (In other words, I make sure that I keep at least one incognito tab open all the time.)




  • Then I use "Clear Browsing Data" to clear everything including cookies, from the beginning of time.




  • In incognito tab 2, I go to the same site S. The 'Network' tab of DevTools shows me that the first request sends cookie X. This seems incorrect to me, since cookie X should have been deleted when I did "Clear Browsing Data".




(It seems like "Clear Browsing Data" is running off of a non-incognito tab, and that it therefore cannot access the cookies of incognito tabs. Or something like that.)


Is this a Chrome bug? If so, is it already reported somewhere? (Update: An answer pointed me to Chromium issue 55945, and then I also found 136180. That last one is reported by a Chromium project member who says, "Having "clear browsing data" clear both the normal and incognito profiles would be an easy fix.") If not, can anyone point me to the relevant documentation or standards?



Answer




Chrome's “Clear Browsing Data” does not clear cookies for open incognito tabs?



No, incognito data is wiped when the tab(s)/window(s) are closed.



I open a fresh Chrome (31.0.1650.63 m on Windows 7), no previously kept tabs ("Continue where I left off" is off), no cookies.


… In incognito tab 2, I go to the same site S. The 'Network' tab of DevTools shows me that the first request sends cookie X. This seems incorrect to me.



I know what you mean; it seems logical that using incognito would allow for cookies to be independent so that you could open a couple of windows to the same site and log in with different usernames. However, that is not how Chrome’s incognito implementation works.


When you open an incognito window, Chrome creates a new and separate instance of itself which behaves just like the regular version in every way, except that it does not store cached files on disk or record anything in the logs. Because it behaves like the regular browser, it shares cookies and other session information among the open tabs and windows. That is why all of the incognito tabs that have the same page loaded will be able to see the same cookies.


When close the last incognito tab, Chrome wipes out the cookies and other session information. Until then, they are retained.



(It seems like "Clear Browsing Data" is running off of a non-incognito tab, and that it therefore cannot access the cookies of incognito tabs. Or something like that.)



All browser-related tabs like settings, extensions, plugins, history, downloads, etc. run in a regular, non-incognito window and have access to the whole browser, including incognito windows.



Is this a Chrome bug?



No, it is intended behavior.



If so, is it already reported somewhere? If not, can anyone point me to the relevant documentation or standards?



Yes, this was reported in 2010, but was closed. Further, there are discussions which indicate that this is normal behavior and will not be changed in the foreseeable future. [1][2][3][4] You can check up on changes or file a new report (though they might very well just close it as a duplicate of the previous one).


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...