If you are using a vpn for anonymity you can allow cookies when you surf the internet but you must delete them once you close the browser to get complete anonymity. Is this correct?
Or is it that just allowing cookies removes anonymity?
Information Security Stack Exchange is a question and answer site for information security professionals. It only takes a minute to sign up.Sign up to join this community
First, you don't get complete anonymity just by using a VPN in the first place. A VPN will only reduce the tracking surface but not remove it. Similar removing cookies will only reduce the tracking surface further but not remove it too. There are still enough cached information in the browser outside of cookies and these can be used to track you. Removing the browser profile completely will remove these traces but it will for example not help against fingerprinting your based on some system properties from within the browser.
In short, removing cookies will help a bit - but only a bit.
There's no such thing as "complete anonymity". Cookies aren't the only way to track a web user. Browsers can be uniquely fingerprinted, and they offer other persistent storage locations besides cookies.
Allowing 3rd party cookies at all allows your activities to be tracked across different websites during your browsing session (usually by advertising corporations, possibly partially prevented by using an ad blocker). It doesn't necessarily disclose your identity, but can at least start to paint a picture about you, which could eventually reveal who you are.
Now, if you are logging into any websites that are tied to your real identity, you can completely forget about anonymity. There are even studies on how somebody can be potentially identified after a few Google searches.
So, your best bet to improve your anonymity (relating to cookies) is to disallow 3rd party cookies altogether, clear all cookies, preferably after leaving each site (browser extensions can help), and consider blocking known tracking domains. You could disable all cookies, but it may break some websites.