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
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
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.)