零点课堂 | What Are Cookies?（2）
You might have guessed that a third-party cookie is one that wasn't created by the host domain. Suppose now that both ilovehoneybadgers.com and another website that you visited serve ads to their users. Those ads come from the same provider, whose code is injected into the webpage of both domains.
When you visit either site, the provider creates a third-party cookie for tracking purposes. Then, as you move around the web to other sites with their code, they'll recognize you and serve up the same ads. Essentially, they track your browsing habits to build out a profile used for targeting.
Unsurprisingly, third-party cookies are also known as tracking cookies.
What are cookies made of?
Not all cookies are created equal. As we've seen from the two examples in the previous section, they're a versatile data type. Let's now look at a real-life example: if you've signed into Ask Academy, your browser will show you a cookie for the site. This is what allows you to post questions and answers without constantly needing to log in again.
On Google Chrome, access your cookies by navigating to Settings > Privacy and security > Cookies and other site data. On Firefox, manage cookies under Preferences > Privacy & Security > Cookies and Site Data (note that you should use the Storage Inspector to view their actual contents).
Nothing too sophisticated in there, right? There's minimal personal information (and it isn't shared with other domains). Those numbers you see are timestamps – one tells you when the cookie was issued, and the other tells you when it expires. You also see the issuer, your username, your role (user or moderator), and a string related to authentication.
Cookies typically have this key-value pair system. Note that many sites nowadays will provide a user ID. Once an individual visits, the server checks its database for any information it has on them and tailors the user experience accordingly.
If you fire up the prompt to clear your browsing history, you generally get the option to clear cookies, too. When you do this, you don't cause any major damage to site data. You'll notice, however, that you'll need to reenter any login information when you return to the sites that provided you with the cookies.