Chrome exempts Google sites from user site data settings

October 7 2020 by Jeff Johnson

In Google Chrome's "Cookies and site data" settings, accessible via the Preferences menu item or directly with chrome://settings/cookies in the address bar, you can enable the setting "Clear cookies and site data when you quit Chrome". However, I've discovered that Chrome exempts Google's own sites, such as Search and YouTube, from this setting.

Below I visit Apple's site, which sets some cookies and local storage.

My settings allow only Twitter to keep site data, and you can see that all of the Apple data was deleted after quit and relaunch.

Now I visit YouTube, which sets some cookies and several other kinds of storage.

After I quit and relaunch, the cookies are deleted, but the database storage, local storage, and service workers are still there! (Did you know there are so many different kinds of web storage?)

Chrome respects the "Clear cookies and site data when you quit Chrome" setting for apple.com but not entirely for youtube.com. In order to prevent YouTube from saving data, you have to add it to "Sites that can never use cookies". (Note that adding YouTube to "Always clear cookies when windows are closed" is not sufficient.)

Now I try visiting Google Search, which sets some cookies and local storage.

After quit and relaunch, the cookies are deleted, but the local storage is still there!

Again, to prevent this from happening, you have to add google.com to "Sites that can never use cookies".

Perhaps this is just a Google Chrome bug, not intentional behavior, but the question is why it only affects Google sites, not non-Google sites. I've tested using the latest Google Chrome version 86.0.4240.75 for macOS, but this behavior was also happening in the previous version of Chrome. I don't know when it started.

(Some people are going to read this article and say "Use Safari instead of Chrome!" But it's important to note that Safari doesn't even have the feature to clear site data on quit, so Safari is actually worse. In this respect, Safari is years behind. Firefox and all of the Chromium-based browsers already have the clear site data on quit feature.)

Jeff Johnson (My apps, PayPal.Me)